I don't quite understand the SAX exception, but there are serious
errors in the WSDL document. I suggest you go back to the people that
gave you the WSDL and tell them that they need to fix it. It contains
the following errors:

1- You must supply a name for the WSDL document. It must not be an empty string.
2- You must not use <wsdl:import> to import schemas. Because you are
trying to assemble multiple schemas from the same namespace, you must
use <xsd:include>.
3- A <wsdl:part> definition must contain an "element" attribute when
using "document" style or a "type" attribute when using "rpc" style.
It must not include both attributes.
4- A portType's <wsdl:operation> definition should not include a
"parameterOrder" attribute when using "document" style.
5- A "document" style binding must use literal encoding. 
6- If you want to access this service from a remote system, you must
specify a DNS-resolvable URL in the location attribute in the
<wsdlsoap:address> definition (not localhost).

Here is a corrected WSDL (except for error #6 -- please specify a
proper location):

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://ejbs.websrv.napsi.eng.it";
name="webServ"
 xmlns:impl="http://ejbs.websrv.napsi.eng.it"; 
 xmlns:intf="http://ejbs.websrv.napsi.eng.it"; 
 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
 xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
 xmlns:xsd="http://www.w3.org/2001/XMLSchema";
 xmlns:requestRicIndividuo="http://webServ";
 xmlns:responseRicIndividuo="http://webServ";
 xmlns:requestRicToponomastica="http://webServ";
 xmlns:responseRicToponomastica="http://webServ";
 xmlns:requestUpdate="http://webServ";
 xmlns:responseUpdate="http://webServ";
 >
 <!--
   WSDL created by Apache Axis version: 1.2beta3
   Built on Aug 01, 2004 (05:59:22 PDT)
 -->
 <wsdl:types>
  <xsd:schema targetNamespace="http://webServ";>
   <xsd:include schemaLocation="inputRicIndividuo.xsd"/>
   <xsd:include schemaLocation="inputToponomastica.xsd"/> 
   <xsd:include schemaLocation="outputRicIndividuo.xsd"/>
   <xsd:include schemaLocation="outputToponomastica.xsd"/>  
   <!--xsd:include schemaLocation="inputUpdate.xsd"/> 
   <xsd:include schemaLocation="outputUpdate.xsd"/-->
  </xsd:schema>
 </wsdl:types>

 <wsdl:message name="updateRequest">
   <wsdl:part name="input" element="requestUpdate:update"/>
 </wsdl:message>
 <wsdl:message name="updateResponse">
   <wsdl:part name="updateReturn" element="responseUpdate:esitoAggiornamento"/>
 </wsdl:message>

 <!--
        Sezione di ricerca tramite codice famiglia
  -->
 <!-- Request di ricerca byFamilyCode -->
 <wsdl:message name="byFamilyCodeRequest">
   <wsdl:part name="input" element="requestRicIndividuo:ricercaIndividuo"/>
 </wsdl:message>
 <wsdl:message name="byFamilyCodeResponse">
   <wsdl:part name="byFamilyCodeReturn"
      element="responseRicIndividuo:esitoRicercaIndividuo"/>
 </wsdl:message>

 <!--
        Sezione di ricerca toponomastica.
 -->
 <!-- Request di ricerca toponomastica -->
 <wsdl:message name="toponomasticRequest">
   <wsdl:part name="input"
element="requestRicToponomastica:ricercaToponomastica"/>
 </wsdl:message>
 <!-- Response di ricerca toponomastica -->
 <wsdl:message name="toponomasticResponse">
   <wsdl:part name="toponomasticReturn" 
       element="responseRicToponomastica:esitoRicercaToponomastica"/>
 </wsdl:message>

 <!--
         Sezione di ricerca tramite dati utenti
 -->
 <!-- Request di ricerca byUserData -->
 <wsdl:message name="byUserDataRequest">
   <wsdl:part name="input" element="requestRicIndividuo:ricercaIndividuo"/>
 </wsdl:message>
 <!-- Response di ricerca byUserData -->
 <wsdl:message name="byUserDataResponse">
   <wsdl:part name="byUserDataReturn"
      element="responseRicIndividuo:esitoRicercaIndividuo"/>
 </wsdl:message>

 <!--
         Sezione di ricerca tramite codice fiscale
 -->
 <!-- Request di ricerca byFiscalCode -->
 <wsdl:message name="byFiscalCodeRequest">
   <wsdl:part name="doc" element="requestRicIndividuo:ricercaIndividuo"/>
 </wsdl:message>
 <!-- Response di ricerca byFiscalCode -->
 <wsdl:message name="byFiscalCodeResponse">
   <wsdl:part name="byFiscalCodeReturn"
       element="responseRicIndividuo:esitoRicercaIndividuo"/>
 </wsdl:message>

 <wsdl:portType name="Searcher">
   <wsdl:operation name="update">
     <wsdl:input message="impl:updateRequest" name="updateRequest"/>
     <wsdl:output message="impl:updateResponse" name="updateResponse"/>
   </wsdl:operation>
   <wsdl:operation name="byFiscalCode">
     <wsdl:input message="impl:byFiscalCodeRequest" name="byFiscalCodeRequest"/>
     <wsdl:output message="impl:byFiscalCodeResponse"
name="byFiscalCodeResponse"/>
   </wsdl:operation>
   <wsdl:operation name="byUserData">
     <wsdl:input message="impl:byUserDataRequest" name="byUserDataRequest"/>
     <wsdl:output message="impl:byUserDataResponse" name="byUserDataResponse"/>
   </wsdl:operation>
   <wsdl:operation name="byFamilyCode">
     <wsdl:input message="impl:byFamilyCodeRequest" name="byFamilyCodeRequest"/>
     <wsdl:output message="impl:byFamilyCodeResponse"
name="byFamilyCodeResponse"/>
   </wsdl:operation>
   <wsdl:operation name="toponomastic">
     <wsdl:input message="impl:toponomasticRequest" name="toponomasticRequest"/>
     <wsdl:output message="impl:toponomasticResponse"
name="toponomasticResponse"/>
   </wsdl:operation>
 </wsdl:portType>
 <wsdl:binding name="SearcherSoapBinding" type="impl:Searcher">
   <wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
   <wsdl:operation name="update">
     <wsdlsoap:operation soapAction=""/>
     <wsdl:input name="updateRequest">
       <wsdlsoap:body use="literal"/>
     </wsdl:input>
     <wsdl:output name="updateResponse">
       <wsdlsoap:body use="literal"/>
     </wsdl:output>
   </wsdl:operation>
   <wsdl:operation name="byFiscalCode">
     <wsdlsoap:operation soapAction=""/>
     <wsdl:input name="byFiscalCodeRequest">
       <wsdlsoap:body use="literal"/>
     </wsdl:input>
     <wsdl:output name="byFiscalCodeResponse">
       <wsdlsoap:body use="literal"/>
     </wsdl:output>
   </wsdl:operation>
   <wsdl:operation name="byUserData">
     <wsdlsoap:operation soapAction=""/>
     <wsdl:input name="byUserDataRequest">
       <wsdlsoap:body use="literal"/>
     </wsdl:input>
     <wsdl:output name="byUserDataResponse">
       <wsdlsoap:body use="literal"/>
     </wsdl:output>
   </wsdl:operation>
   <wsdl:operation name="byFamilyCode">
     <wsdlsoap:operation soapAction=""/>
     <wsdl:input name="byFamilyCodeRequest">
       <wsdlsoap:body use="literal"/>
     </wsdl:input>
     <wsdl:output name="byFamilyCodeResponse">
       <wsdlsoap:body use="literal"/>
     </wsdl:output>
   </wsdl:operation>
   <wsdl:operation name="toponomastic">
     <wsdlsoap:operation soapAction=""/>
     <wsdl:input name="toponomasticRequest">
       <wsdlsoap:body use="literal"/>
     </wsdl:input>
     <wsdl:output name="toponomasticResponse">
       <wsdlsoap:body use="literal"/>
     </wsdl:output>
   </wsdl:operation>
 </wsdl:binding>
 <wsdl:service name="SearcherService">
   <wsdl:port binding="impl:SearcherSoapBinding" name="Searcher">
     <wsdlsoap:address
location="http://localhost:8080/ServicePublisher/services/Searcher"/>
   </wsdl:port>
 </wsdl:service>
</wsdl:definitions>


On Apr 11, 2005 8:58 AM, angeloimm <[EMAIL PROTECTED]> wrote:
> Hi all; i must use a web service; this is a document style service. I know 
> only the wsdl that is:
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions targetNamespace="http://ejbs.websrv.napsi.eng.it"; name="" 
> xmlns:apachesoap="http://xml.apache.org/xml-soap"; 
> xmlns:impl="http://ejbs.websrv.napsi.eng.it"; 
> xmlns:intf="http://ejbs.websrv.napsi.eng.it"; 
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
>   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
>   xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
>   xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>   xmlns:requestRicIndividuo="http://webServ";
>   xmlns:responseRicIndividuo="http://webServ";
>   xmlns:requestRicToponomastica="http://webServ";
>   xmlns:responseRicToponomastica="http://webServ";
>   xmlns:requestUpdate="http://webServ";
>   xmlns:responseUpdate="http://webServ";
>   >
>   <!--
>     WSDL created by Apache Axis version: 1.2beta3
>     Built on Aug 01, 2004 (05:59:22 PDT)
>   -->
>   <wsdl:import namespace="http://webServ"; location="inputRicIndividuo.xsd">  
> </wsdl:import>
>   <wsdl:import namespace="http://webServ"; location="inputToponomastica.xsd">  
> </wsdl:import>
>   <wsdl:import namespace="http://webServ"; location="outputRicIndividuo.xsd">  
> </wsdl:import>
>   <wsdl:import namespace="http://webServ"; location="outputToponomastica.xsd"> 
>  </wsdl:import>
>   <!--wsdl:import namespace="http://webServ"; location="inputUpdate.xsd">  
> </wsdl:import>
>   <wsdl:import namespace="http://webServ"; location="outputUpdate.xsd">  
> </wsdl:import-->
> 
>     <wsdl:message name="updateRequest">
>     <wsdl:part name="input" type="apachesoap:Document" 
> element="requestUpdate:update"/>
>   </wsdl:message>
>   <wsdl:message name="updateResponse">
>     <wsdl:part name="updateReturn" type="apachesoap:Document" 
> element="responseUpdate:esitoAggiornamento"/>
>   </wsdl:message>
> 
>   <!--
>          Sezione di ricerca tramite codice famiglia
>    -->
>   <!-- Request di ricerca byFamilyCode -->
>   <wsdl:message name="byFamilyCodeRequest">
>     <wsdl:part name="input" type="apachesoap:Document" 
> element="requestRicIndividuo:ricercaIndividuo"/>
>   </wsdl:message>
>   <wsdl:message name="byFamilyCodeResponse">
>     <wsdl:part name="byFamilyCodeReturn" type="apachesoap:Document" 
> element="responseRicIndividuo:esitoRicercaIndividuo"/>
>   </wsdl:message>
> 
>   <!--
>          Sezione di ricerca toponomastica.
>   -->
>   <!-- Request di ricerca toponomastica -->
>   <wsdl:message name="toponomasticRequest">
>     <wsdl:part name="input" type="apachesoap:Document" 
> element="requestRicToponomastica:ricercaToponomastica"/>
>   </wsdl:message>
>   <!-- Response di ricerca toponomastica -->
>   <wsdl:message name="toponomasticResponse">
>     <wsdl:part name="toponomasticReturn" 
> element="responseRicToponomastica:esitoRicercaToponomastica" 
> type="apachesoap:Document"/>
>   </wsdl:message>
> 
>   <!--
>           Sezione di ricerca tramite dati utenti
>   -->
>   <!-- Request di ricerca byUserData -->
>   <wsdl:message name="byUserDataRequest">
>     <wsdl:part name="input" type="apachesoap:Document" 
> element="requestRicIndividuo:ricercaIndividuo"/>
>   </wsdl:message>
>   <!-- Response di ricerca byUserData -->
>   <wsdl:message name="byUserDataResponse">
>     <wsdl:part name="byUserDataReturn" type="apachesoap:Document" 
> element="responseRicIndividuo:esitoRicercaIndividuo"/>
>   </wsdl:message>
> 
>   <!--
>           Sezione di ricerca tramite codice fiscale
>   -->
>   <!-- Request di ricerca byFiscalCode -->
>   <wsdl:message name="byFiscalCodeRequest">
>     <wsdl:part name="doc" type="apachesoap:Document" 
> element="requestRicIndividuo:ricercaIndividuo"/>
>   </wsdl:message>
>   <!-- Response di ricerca byFiscalCode -->
>   <wsdl:message name="byFiscalCodeResponse">
>     <wsdl:part name="byFiscalCodeReturn" type="apachesoap:Document" 
> element="responseRicIndividuo:esitoRicercaIndividuo"/>
>   </wsdl:message>
> 
>   <wsdl:portType name="Searcher">
>     <wsdl:operation name="update" parameterOrder="input">
>       <wsdl:input message="impl:updateRequest" name="updateRequest"/>
>       <wsdl:output message="impl:updateResponse" name="updateResponse"/>
>     </wsdl:operation>
>     <wsdl:operation name="byFiscalCode" parameterOrder="doc">
>       <wsdl:input message="impl:byFiscalCodeRequest" 
> name="byFiscalCodeRequest"/>
>       <wsdl:output message="impl:byFiscalCodeResponse" 
> name="byFiscalCodeResponse"/>
>     </wsdl:operation>
>     <wsdl:operation name="byUserData" parameterOrder="input">
>       <wsdl:input message="impl:byUserDataRequest" name="byUserDataRequest"/>
>       <wsdl:output message="impl:byUserDataResponse" 
> name="byUserDataResponse"/>
>     </wsdl:operation>
>     <wsdl:operation name="byFamilyCode" parameterOrder="input">
>       <wsdl:input message="impl:byFamilyCodeRequest" 
> name="byFamilyCodeRequest"/>
>       <wsdl:output message="impl:byFamilyCodeResponse" 
> name="byFamilyCodeResponse"/>
>     </wsdl:operation>
>     <wsdl:operation name="toponomastic" parameterOrder="input">
>       <wsdl:input message="impl:toponomasticRequest" 
> name="toponomasticRequest"/>
>       <wsdl:output message="impl:toponomasticResponse" 
> name="toponomasticResponse"/>
>     </wsdl:operation>
>   </wsdl:portType>
>   <wsdl:binding name="SearcherSoapBinding" type="impl:Searcher">
>     <wsdlsoap:binding style="document" 
> transport="http://schemas.xmlsoap.org/soap/http"/>
>     <wsdl:operation name="update">
>       <wsdlsoap:operation soapAction=""/>
>       <wsdl:input name="updateRequest">
>         <wsdlsoap:body 
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; use="encoded"/>
>       </wsdl:input>
>       <wsdl:output name="updateResponse">
>         <wsdlsoap:body 
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; use="encoded"/>
>       </wsdl:output>
>     </wsdl:operation>
>     <wsdl:operation name="byFiscalCode">
>       <wsdlsoap:operation soapAction=""/>
>       <wsdl:input name="byFiscalCodeRequest">
>         <wsdlsoap:body 
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; use="encoded"/>
>       </wsdl:input>
>       <wsdl:output name="byFiscalCodeResponse">
>         <wsdlsoap:body 
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; use="encoded"/>
>       </wsdl:output>
>     </wsdl:operation>
>     <wsdl:operation name="byUserData">
>       <wsdlsoap:operation soapAction=""/>
>       <wsdl:input name="byUserDataRequest">
>         <wsdlsoap:body 
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; use="encoded"/>
>       </wsdl:input>
>       <wsdl:output name="byUserDataResponse">
>         <wsdlsoap:body 
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; use="encoded"/>
>       </wsdl:output>
>     </wsdl:operation>
>     <wsdl:operation name="byFamilyCode">
>       <wsdlsoap:operation soapAction=""/>
>       <wsdl:input name="byFamilyCodeRequest">
>         <wsdlsoap:body 
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; use="encoded"/>
>       </wsdl:input>
>       <wsdl:output name="byFamilyCodeResponse">
>         <wsdlsoap:body 
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; use="encoded"/>
>       </wsdl:output>
>     </wsdl:operation>
>     <wsdl:operation name="toponomastic">
>       <wsdlsoap:operation soapAction=""/>
>       <wsdl:input name="toponomasticRequest">
>         <wsdlsoap:body 
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; use="encoded"/>
>       </wsdl:input>
>       <wsdl:output name="toponomasticResponse">
>         <wsdlsoap:body 
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; use="encoded"/>
>       </wsdl:output>
>     </wsdl:operation>
>   </wsdl:binding>
>   <wsdl:service name="SearcherService">
>     <wsdl:port binding="impl:SearcherSoapBinding" name="Searcher">
>       <wsdlsoap:address 
> location="http://localhost:8080/ServicePublisher/services/Searcher"/>
>     </wsdl:port>
>   </wsdl:service>
> </wsdl:definitions>
> 
> Now i'm using wsdl2java for generating the stub and skeleton stubs... but i 
> have this error:
> 
> org.xml.sax.SAXException: Fatal Error: 
> URI=file:/D:/project/untitled1/Searcher.wsdl Line=1: Elemento root del 
> documento mancante.
>         at 
> org.apache.axis.utils.XMLUtils$ParserErrorHandler.fatalError(XMLUtils.java:687)
>         at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3379)
>         at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3364)
>         at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:668)
>         at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
>         at 
> org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
>         at 
> org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:185)
>         at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:332)
>         at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:383)
>         at 
> org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:470)
>         at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:356)
>         at java.lang.Thread.run(Thread.java:534)
> 
> Can anybody help me? Thanks....
> 
> ____________________________________________________________
> Navighi a 4 MEGA e i primi 3 mesi sono GRATIS.
> Scegli Libero Adsl Flat senza limiti su http://www.libero.it
> 
>

Reply via email to