I've written a
doc/literal WSDL. This has one operation "echo".
The input message
for this operation refers to an element "ipml:echo" . This element is of
complextype which contains a sequence.
Output message
refers to an element "impl:echoReturn. This element is of complex type which
contains nothing.
When I create client
stubs with WSDL, essentially this should be mapped to an operation which takes
void and returns a bean (which encapsulates the sequence)
On Axis, I get the
following signature
wstest.local.Testbean echo(wstest.local.EchoRequest parameters)
On .Net, I get the
following signature
public int
echo([System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
out string city,
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
out string state) {
Thus instead of a
bean return type, .Net makes the first field of the sequence as return value and
rest of the fields become out parameters.
Is this a bug in
.Net or there is some problem with my WSDL?
The WSDL is as
follows:
<?xml
version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:local:wstest" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:local:wstest" xmlns:intf="urn:local:wstest" 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">
<wsdl:types>
<schema targetNamespace="urn:local:wstest"
xmlns="http://www.w3.org/2001/XMLSchema">
<complexType name="EchoRequest"/>
<element name="echo" type="impl:EchoRequest"/>
<complexType name="testbean">
<sequence>
<element name="pincode" type="xsd:int"/>
<element name="city" type="xsd:string"/>
<element name="state" type="xsd:string"/>
</sequence>
</complexType>
<element name="echoReturn" type="impl:testbean"/>
</schema>
</wsdl:types>
<wsdl:definitions targetNamespace="urn:local:wstest" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:local:wstest" xmlns:intf="urn:local:wstest" 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">
<wsdl:types>
<schema targetNamespace="urn:local:wstest"
xmlns="http://www.w3.org/2001/XMLSchema">
<complexType name="EchoRequest"/>
<element name="echo" type="impl:EchoRequest"/>
<complexType name="testbean">
<sequence>
<element name="pincode" type="xsd:int"/>
<element name="city" type="xsd:string"/>
<element name="state" type="xsd:string"/>
</sequence>
</complexType>
<element name="echoReturn" type="impl:testbean"/>
</schema>
</wsdl:types>
<wsdl:message name="echoRequest">
<wsdl:part element="impl:echo" name="parameters"/>
</wsdl:message>
<wsdl:part element="impl:echo" name="parameters"/>
</wsdl:message>
<wsdl:message
name="echoResponse">
<wsdl:part element="impl:echoReturn" name="parameters"/>
</wsdl:message>
<wsdl:part element="impl:echoReturn" name="parameters"/>
</wsdl:message>
<wsdl:portType name="echoInterface">
<wsdl:operation name="echo">
<wsdl:input message="impl:echoRequest" name="echoRequest"/>
<wsdl:output message="impl:echoResponse" name="echoResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:operation name="echo">
<wsdl:input message="impl:echoRequest" name="echoRequest"/>
<wsdl:output message="impl:echoResponse" name="echoResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="echoServiceSoapBinding"
type="impl:echoInterface">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="echo">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="echoRequest">
<wsdlsoap:body namespace="urn:local:wstest" use="literal"/>
</wsdl:input>
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="echo">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="echoRequest">
<wsdlsoap:body namespace="urn:local:wstest" use="literal"/>
</wsdl:input>
<wsdl:output name="echoResponse">
<wsdlsoap:body namespace="urn:local:wstest" use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdlsoap:body namespace="urn:local:wstest" use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="echoService">
<wsdl:port binding="impl:echoServiceSoapBinding" name="TestService">
<wsdlsoap:address location="http://localhost:8080/axis/services/TestService"/>
</wsdl:port>
</wsdl:service>
<wsdl:port binding="impl:echoServiceSoapBinding" name="TestService">
<wsdlsoap:address location="http://localhost:8080/axis/services/TestService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
thanks,
Naresh
