You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Tin Hoang <ti...@realpagemaker.com> on 2007/07/25 22:13:35 UTC

WSDL2Java: WSDL generation issue.

Hello all,

I am currently having problems with the WSDL2Java tool. 
I use the WSDL defined at: 

http://developer.intuit.com/uploadedFiles/Support/QBWebConnectorSvc.wsdl

to be feed into the WSDL2Java executable packaged with Apache Axis 1.4
to generate my skeleton code for the webservice required by QuickBooks
Web Connector. 

here is the actual call to WSDL2Java: 

java org.apache.axis.wsdl.WSDL2Java --server-side --skeletonDeploy true
http://developer.intuit.com/uploadedFiles/Support/QBWebConnectorSvc.wsdl

I then implement the function authenticate, inside
QBWebConnectorSvcSoapImp.java to return a String[2] since the skeleton
code autogenerated my return type to be a String[]. I then deploy the
service on Tomcat 5.0.28 using:

java org.apache.axis.client.AdminClient deploy.wsdd

Finally to test that my service works by using a WSDL validator found
at: 

http://www.mgateway.com/php/wsdlValidator/home.php 

With this WSDL validator you can view the WSDL your web service
generates by clicking on "View WSDL". Strangely the WSDL file for my
service is different than the WSDL file at

http://developer.intuit.com/uploadedFiles/Support/QBWebConnectorSvc.wsdl

Shouldn't these two WSDL be exactly the same? 

Here are the two WSDL's: 

1) Here are the relevant lines in the Intuit WSDL, found at:

http://developer.intuit.com/uploadedFiles/Support/QBWebConnectorSvc.wsdl

This is different from my WSDL returned by "View WSDL" from the WSDL
validator.

<wsdl:definitions>
... 
<s:element name='authenticate'> 
<s:complexType> 
<s:sequence> 
<s:element minOccurs='0' maxOccurs='1' name='strUserName'
type='s:string'/> 
<s:element minOccurs='0' maxOccurs='1' name='strPassword'
type='s:string'/> 
</s:sequence> 
</s:complexType> 
</s:element> 
<s:element name='authenticateResponse'> 
<s:complexType> 
<s:sequence> 
<s:element minOccurs='0' maxOccurs='1' name='authenticateResult'
type='tns:ArrayOfString'/> 
</s:sequence> 
</s:complexType> 
</s:element> 
<s:complexType name='ArrayOfString'> 
<s:sequence> 
<s:element minOccurs='0' maxOccurs='unbounded' name='string'
nillable='true' type='s:string'/> 
</s:sequence> 
</s:complexType> 
... 
<wsdl:/definitions>

2) Here is that same section in my WSDL as outputted by the WSDL
validator: 

<wsdl:definitions>
... 
<element name='authenticate'> 
<complexType> 
<sequence> 
<element name='in0' type='xsd:string'/> 
<element name='in1' type='xsd:string'/> 
</sequence> 
</complexType> 
</element> 
<element name='authenticateResponse'> 
<complexType> 
<sequence> 
<element maxOccurs='unbounded' name='authenticateReturn'
type='xsd:string'/> 
</sequence> 
</complexType> 
</element> 
... 
<wsdl:/definitions>

Could someone explain why these two WSDL are different and how I could
make my WSDL like the one from the Intuit url?

Finally my complete WSDL from my generated webservice using AXIS:

<?xml version='1.0' encoding='UTF-8'?>
<wsdl:definitions targetNamespace='http://developer.intuit.com/'
xmlns:apachesoap='http://xml.apache.org/xml-soap'
xmlns:impl='http://developer.intuit.com/'
xmlns:intf='http://developer.intuit.com/'
xmlns:tns1='http://developer.intuit.com'
xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
xmlns:wsdlsoap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
   <!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->
   <wsdl:types>
      <schema elementFormDefault='qualified'
targetNamespace='http://developer.intuit.com'
xmlns='http://www.w3.org/2001/XMLSchema'>
         <element name='authenticate'>
            <complexType>
               <sequence>
                  <element name='in0' type='xsd:string'/>
                  <element name='in1' type='xsd:string'/>
               </sequence>
            </complexType>
         </element>
         <element name='authenticateResponse'>
            <complexType>
               <sequence>
                  <element maxOccurs='unbounded'
name='authenticateReturn' type='xsd:string'/>
               </sequence>
            </complexType>
         </element>
         <element name='getOperationDescs'>
            <complexType/>
         </element>
         <element name='getOperationDescsResponse'>
            <complexType>
               <sequence>
                  <element maxOccurs='unbounded'
name='getOperationDescsReturn' type='xsd:anyType'/>
               </sequence>
            </complexType>
         </element>
         <element name='getOperationDescByName'>
            <complexType>
               <sequence>
                  <element name='in0' type='xsd:string'/>
               </sequence>
            </complexType>
         </element>
         <element name='getOperationDescByNameResponse'>
            <complexType>
               <sequence>
                  <element maxOccurs='unbounded'
name='getOperationDescByNameReturn' type='xsd:anyType'/>
               </sequence>
            </complexType>
         </element>
         <element name='sendRequestXML'>
            <complexType>
               <sequence>
                  <element name='in0' type='xsd:string'/>
                  <element name='in1' type='xsd:string'/>
                  <element name='in2' type='xsd:string'/>
                  <element name='in3' type='xsd:string'/>
                  <element name='in4' type='xsd:int'/>
                  <element name='in5' type='xsd:int'/>
               </sequence>
            </complexType>
         </element>
         <element name='sendRequestXMLResponse'>
            <complexType>
               <sequence>
                  <element name='sendRequestXMLReturn'
type='xsd:string'/>
               </sequence>
            </complexType>
         </element>
         <element name='receiveResponseXML'>
            <complexType>
               <sequence>
                  <element name='in0' type='xsd:string'/>
                  <element name='in1' type='xsd:string'/>
                  <element name='in2' type='xsd:string'/>
                  <element name='in3' type='xsd:string'/>
               </sequence>
            </complexType>
         </element>
         <element name='receiveResponseXMLResponse'>
            <complexType>
               <sequence>
                  <element name='receiveResponseXMLReturn'
type='xsd:int'/>
               </sequence>
            </complexType>
         </element>
         <element name='connectionError'>
            <complexType>
               <sequence>
                  <element name='in0' type='xsd:string'/>
                  <element name='in1' type='xsd:string'/>
                  <element name='in2' type='xsd:string'/>
               </sequence>
            </complexType>
         </element>
         <element name='connectionErrorResponse'>
            <complexType>
               <sequence>
                  <element name='connectionErrorReturn'
type='xsd:string'/>
               </sequence>
            </complexType>
         </element>
         <element name='getLastError'>
            <complexType>
               <sequence>
                  <element name='in0' type='xsd:string'/>
               </sequence>
            </complexType>
         </element>
         <element name='getLastErrorResponse'>
            <complexType>
               <sequence>
                  <element name='getLastErrorReturn' type='xsd:string'/>
               </sequence>
            </complexType>
         </element>
         <element name='closeConnection'>
            <complexType>
               <sequence>
                  <element name='in0' type='xsd:string'/>
               </sequence>
            </complexType>
         </element>
         <element name='closeConnectionResponse'>
            <complexType>
               <sequence>
                  <element name='closeConnectionReturn'
type='xsd:string'/>
               </sequence>
            </complexType>
         </element>
      </schema>
   </wsdl:types>
   <wsdl:message name='getLastErrorResponse'>
      <wsdl:part element='tns1:getLastErrorResponse' name='parameters'/>
   </wsdl:message>
   <wsdl:message name='closeConnectionRequest'>
      <wsdl:part element='tns1:closeConnection' name='parameters'/>
   </wsdl:message>
   <wsdl:message name='connectionErrorResponse'>
      <wsdl:part element='tns1:connectionErrorResponse'
name='parameters'/>
   </wsdl:message>
   <wsdl:message name='sendRequestXMLRequest'>
      <wsdl:part element='tns1:sendRequestXML' name='parameters'/>
   </wsdl:message>
   <wsdl:message name='getOperationDescByNameRequest'>
      <wsdl:part element='tns1:getOperationDescByName'
name='parameters'/>
   </wsdl:message>
   <wsdl:message name='receiveResponseXMLRequest'>
      <wsdl:part element='tns1:receiveResponseXML' name='parameters'/>
   </wsdl:message>
   <wsdl:message name='getOperationDescByNameResponse'>
      <wsdl:part element='tns1:getOperationDescByNameResponse'
name='parameters'/>
   </wsdl:message>
   <wsdl:message name='sendRequestXMLResponse'>
      <wsdl:part element='tns1:sendRequestXMLResponse'
name='parameters'/>
   </wsdl:message>
   <wsdl:message name='receiveResponseXMLResponse'>
      <wsdl:part element='tns1:receiveResponseXMLResponse'
name='parameters'/>
   </wsdl:message>
   <wsdl:message name='connectionErrorRequest'>
      <wsdl:part element='tns1:connectionError' name='parameters'/>
   </wsdl:message>
   <wsdl:message name='closeConnectionResponse'>
      <wsdl:part element='tns1:closeConnectionResponse'
name='parameters'/>
   </wsdl:message>
   <wsdl:message name='getOperationDescsResponse'>
      <wsdl:part element='tns1:getOperationDescsResponse'
name='parameters'/>
   </wsdl:message>
   <wsdl:message name='getLastErrorRequest'>
      <wsdl:part element='tns1:getLastError' name='parameters'/>
   </wsdl:message>
   <wsdl:message name='authenticateRequest'>
      <wsdl:part element='tns1:authenticate' name='parameters'/>
   </wsdl:message>
   <wsdl:message name='authenticateResponse'>
      <wsdl:part element='tns1:authenticateResponse' name='parameters'/>
   </wsdl:message>
   <wsdl:message name='getOperationDescsRequest'>
      <wsdl:part element='tns1:getOperationDescs' name='parameters'/>
   </wsdl:message>
   <wsdl:portType name='QBWebConnectorSvcSoap'>
      <wsdl:operation name='authenticate'>
         <wsdl:input message='impl:authenticateRequest'
name='authenticateRequest'/>
         <wsdl:output message='impl:authenticateResponse'
name='authenticateResponse'/>
      </wsdl:operation>
      <wsdl:operation name='getOperationDescs'>
         <wsdl:input message='impl:getOperationDescsRequest'
name='getOperationDescsRequest'/>
         <wsdl:output message='impl:getOperationDescsResponse'
name='getOperationDescsResponse'/>
      </wsdl:operation>
      <wsdl:operation name='getOperationDescByName'>
         <wsdl:input message='impl:getOperationDescByNameRequest'
name='getOperationDescByNameRequest'/>
         <wsdl:output message='impl:getOperationDescByNameResponse'
name='getOperationDescByNameResponse'/>
      </wsdl:operation>
      <wsdl:operation name='sendRequestXML'>
         <wsdl:input message='impl:sendRequestXMLRequest'
name='sendRequestXMLRequest'/>
         <wsdl:output message='impl:sendRequestXMLResponse'
name='sendRequestXMLResponse'/>
      </wsdl:operation>
      <wsdl:operation name='receiveResponseXML'>
         <wsdl:input message='impl:receiveResponseXMLRequest'
name='receiveResponseXMLRequest'/>
         <wsdl:output message='impl:receiveResponseXMLResponse'
name='receiveResponseXMLResponse'/>
      </wsdl:operation>
      <wsdl:operation name='connectionError'>
         <wsdl:input message='impl:connectionErrorRequest'
name='connectionErrorRequest'/>
         <wsdl:output message='impl:connectionErrorResponse'
name='connectionErrorResponse'/>
      </wsdl:operation>
      <wsdl:operation name='getLastError'>
         <wsdl:input message='impl:getLastErrorRequest'
name='getLastErrorRequest'/>
         <wsdl:output message='impl:getLastErrorResponse'
name='getLastErrorResponse'/>
      </wsdl:operation>
      <wsdl:operation name='closeConnection'>
         <wsdl:input message='impl:closeConnectionRequest'
name='closeConnectionRequest'/>
         <wsdl:output message='impl:closeConnectionResponse'
name='closeConnectionResponse'/>
      </wsdl:operation>
   </wsdl:portType>
   <wsdl:binding name='QBWebConnectorSvcSoapSoapBinding'
type='impl:QBWebConnectorSvcSoap'>
      <wsdlsoap:binding style='document'
transport='http://schemas.xmlsoap.org/soap/http'/>
      <wsdl:operation name='authenticate'>
         <wsdlsoap:operation soapAction=''/>
         <wsdl:input name='authenticateRequest'>
            <wsdlsoap:body use='literal'/>
         </wsdl:input>
         <wsdl:output name='authenticateResponse'>
            <wsdlsoap:body use='literal'/>
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name='getOperationDescs'>
         <wsdlsoap:operation soapAction=''/>
         <wsdl:input name='getOperationDescsRequest'>
            <wsdlsoap:body use='literal'/>
         </wsdl:input>
         <wsdl:output name='getOperationDescsResponse'>
            <wsdlsoap:body use='literal'/>
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name='getOperationDescByName'>
         <wsdlsoap:operation soapAction=''/>
         <wsdl:input name='getOperationDescByNameRequest'>
            <wsdlsoap:body use='literal'/>
         </wsdl:input>
         <wsdl:output name='getOperationDescByNameResponse'>
            <wsdlsoap:body use='literal'/>
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name='sendRequestXML'>
         <wsdlsoap:operation soapAction=''/>
         <wsdl:input name='sendRequestXMLRequest'>
            <wsdlsoap:body use='literal'/>
         </wsdl:input>
         <wsdl:output name='sendRequestXMLResponse'>
            <wsdlsoap:body use='literal'/>
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name='receiveResponseXML'>
         <wsdlsoap:operation soapAction=''/>
         <wsdl:input name='receiveResponseXMLRequest'>
            <wsdlsoap:body use='literal'/>
         </wsdl:input>
         <wsdl:output name='receiveResponseXMLResponse'>
            <wsdlsoap:body use='literal'/>
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name='connectionError'>
         <wsdlsoap:operation soapAction=''/>
         <wsdl:input name='connectionErrorRequest'>
            <wsdlsoap:body use='literal'/>
         </wsdl:input>
         <wsdl:output name='connectionErrorResponse'>
            <wsdlsoap:body use='literal'/>
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name='getLastError'>
         <wsdlsoap:operation soapAction=''/>
         <wsdl:input name='getLastErrorRequest'>
            <wsdlsoap:body use='literal'/>
         </wsdl:input>
         <wsdl:output name='getLastErrorResponse'>
            <wsdlsoap:body use='literal'/>
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name='closeConnection'>
         <wsdlsoap:operation soapAction=''/>
         <wsdl:input name='closeConnectionRequest'>
            <wsdlsoap:body use='literal'/>
         </wsdl:input>
         <wsdl:output name='closeConnectionResponse'>
            <wsdlsoap:body use='literal'/>
         </wsdl:output>
      </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name='QBWebConnectorSvc'>
      <wsdl:port binding='impl:QBWebConnectorSvcSoapSoapBinding'
name='QBWebConnectorSvcSoap'>
         <wsdlsoap:address
location='https://qbwc.realpagemaker.com/axis/services/QBWebConnectorSvcSoap'/>
      </wsdl:port>
   </wsdl:service>
</wsdl:definitions>


Thank you in advance! 


-- 
Tin Hoang
Software Developer @ RealPageMaker
phone. (780) 428-3006 ext. 209
email. tin@realpagemaker.com
http://www.realpagemaker.com

Unleash the Power of VOW: http://www.RealPageMaker.com/vowex/index.jsp


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org