axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Vardeman <andr...@iastate.edu>
Subject possible Java2WSDL problem with doc/lit services?
Date Mon, 08 Jul 2002 21:02:25 GMT
Hello.

I access my doc/lit service with the ?wsdl suffix to get WSDL for it.  Then 
I try to use this WSDL to generate a .NET client.  I run into two 
problems.  First, MS's Wsdl tool complains that it can't find an element 
referenced in the WSDL's SoapBinding:

Error: Unable to import binding 'PsuServerSoapBinding' from namespace 
'http://localhost:8000/psuServer/services/PsuServer/psuServer/services/PsuServer'.
   - Unable to import operation 'process'.
   - The element 'http://schemas.xmlsoap.org/wsdl/:elems' is missing.

I'm guessing this is MS's fault; the tool seems to expect the value of the 
"element" attribute in a part element to be namespace qualified, like this:

<message name="processRequest">
   <part element="tns1:elems" name="elems"/>
</message>

and Axis leaves off that "tns1:"

The second problem is that, according to the Wsdl tool, SOAP Arrays are 
only allowed in encoded SOAP.  I get this complaint:

Error: Unable to import binding 'PsuServerSoapBinding' from namespace 
'http://localhost:8000/psuServer/services/PsuServer/psuServer/services/PsuServer'.
   - Unable to import operation 'process'.
   - Referenced type 'http://schemas.xmlsoap.org/soap/encoding/:Array' 
valid only for encoded SOAP.

If this is true, seems like an Axis problem.

Below is the original WSDL, followed by the hacked-up version that worked 
with Wsdl.exe:


*******ORIGINAL*********


<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions 
targetNamespace="http://localhost:8080/psuServer/services/PsuServer/psuServer/services/PsuServer"

xmlns="http://schemas.xmlsoap.org/wsdl/" 
xmlns:impl="http://localhost:8080/psuServer/services/PsuServer/psuServer/services/PsuServer-impl"

xmlns:intf="http://localhost:8080/psuServer/services/PsuServer/psuServer/services/PsuServer"

xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:tns1="http://xml.apache.org/xml-soap" 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><wsdl:types><schema 
targetNamespace="http://xml.apache.org/xml-soap" 
xmlns="http://www.w3.org/2001/XMLSchema"><import 
namespace="http://schemas.xmlsoap.org/soap/encoding/"/><complexType 
name="Vector"><sequence><element maxOccurs="unbounded" minOccurs="0" 
name="item" type="xsd:anyType"/></sequence></complexType><element 
name="elems" nillable="true" type="tns1:Vector"/></schema><schema 
targetNamespace="http://localhost:8080/psuServer/services/PsuServer/psuServer/services/PsuServer"

xmlns="http://www.w3.org/2001/XMLSchema"><import 
namespace="http://schemas.xmlsoap.org/soap/encoding/"/><complexType 
name="ArrayOf_tns1_Element"><complexContent><restriction 
base="soapenc:Array"><attribute ref="soapenc:arrayType" 
wsdl:arrayType="tns1:Element[]"/></restriction></complexContent></complexType><element

name="return" nillable="true" 
type="intf:ArrayOf_tns1_Element"/></schema></wsdl:types>
   <wsdl:message name="processResponse">
     <wsdl:part element="return" name="return"/>
   </wsdl:message>
   <wsdl:message name="processRequest">
     <wsdl:part element="elems" name="elems"/>
   </wsdl:message>
   <wsdl:portType name="PsuServer">
     <wsdl:operation name="process" parameterOrder="elems">
       <wsdl:input message="intf:processRequest" name="processRequest"/>
       <wsdl:output message="intf:processResponse" name="processResponse"/>
     </wsdl:operation>
   </wsdl:portType>
   <wsdl:binding name="PsuServerSoapBinding" type="intf:PsuServer">
     <wsdlsoap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"/>
     <wsdl:operation name="process">
       <wsdlsoap:operation soapAction=""/>
       <wsdl:input name="processRequest">
         <wsdlsoap:body 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://localhost:8080/psuServer/services/PsuServer/psuServer/services/PsuServer"

use="literal"/>
       </wsdl:input>
       <wsdl:output name="processResponse">
         <wsdlsoap:body 
namespace="http://localhost:8080/psuServer/services/PsuServer/psuServer/services/PsuServer"

use="literal"/>
       </wsdl:output>
     </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name="PsuServerService">
     <wsdl:port binding="intf:PsuServerSoapBinding" name="PsuServer">
       <wsdlsoap:address 
location="http://localhost:8080/psuServer/services/PsuServer"/>
     </wsdl:port>
   </wsdl:service>
</wsdl:definitions>



********VERSION THAT WORKED WITH WSDL.EXE*********



<?xml version="1.0" encoding="UTF-8"?>
<definitions 
targetNamespace="http://localhost:8000/psuServer/services/PsuServer/psuServer/services/PsuServer"

xmlns="http://schemas.xmlsoap.org/wsdl/" 
xmlns:impl="http://localhost:8000/psuServer/services/PsuServer/psuServer/services/PsuServer-impl"

xmlns:intf="http://localhost:8000/psuServer/services/PsuServer/psuServer/services/PsuServer"

xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:tns1="http://xml.apache.org/xml-soap" 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <types>
     <schema targetNamespace="http://xml.apache.org/xml-soap" 
xmlns="http://www.w3.org/2001/XMLSchema">
       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
       <complexType name="Vector">
         <sequence>
           <element maxOccurs="unbounded" minOccurs="0" name="item" 
type="xsd:anyType"/>
         </sequence>
       </complexType>
       <element name="elems" nillable="true" type="tns1:Vector"/>
     </schema>
     <schema 
targetNamespace="http://localhost:8000/psuServer/services/PsuServer/psuServer/services/PsuServer"

xmlns="http://www.w3.org/2001/XMLSchema">
       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
       <complexType name="Vector">
         <sequence>
           <element maxOccurs="unbounded" minOccurs="0" name="item" 
type="xsd:anyType"/>
         </sequence>
       </complexType>
       <element name="return" nillable="true" type="tns1:Vector"/>
     </schema>
   </types>
   <message name="processResponse">
     <part element="intf:return" name="return"/>
       </message>
   <message name="processRequest">
     <part element="tns1:elems" name="elems"/>
   </message>
   <portType name="PsuServer">
     <operation name="process" parameterOrder="elems">
       <input message="intf:processRequest" name="processRequest"/>
       <output message="intf:processResponse" name="processResponse"/>
     </operation>
   </portType>
   <binding name="PsuServerSoapBinding" type="intf:PsuServer">
     <wsdlsoap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"/>
     <operation name="process">
       <wsdlsoap:operation soapAction=""/>
       <input name="processRequest">
         <wsdlsoap:body 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://localhost:8000/psuServer/services/PsuServer/psuServer/services/PsuServer"

use="literal"/>
       </input>
       <output name="processResponse">
         <wsdlsoap:body 
namespace="http://localhost:8000/psuServer/services/PsuServer/psuServer/services/PsuServer"

use="literal"/>
       </output>
     </operation>
   </binding>
   <service name="PsuServerService">
     <port binding="intf:PsuServerSoapBinding" name="PsuServer">
       <wsdlsoap:address 
location="http://localhost:8000/psuServer/services/PsuServer"/>
     </port>
   </service>
</definitions>


Anyone know which toolkit is actually the problem for either of these problems?

Thanks,

Andrew



Mime
View raw message