produce for a WSDL file I wrote. The WSDL file (see attached file)
contains 8 different operations whose soap binding uses different variants
of style and use, along with message parts that use type and element.
That is, I have the following:
style use message-part
rpc encoded type
rpc literal type
rpc encoded element
rpc literal element
document encoded type
document literal type
document encoded element
document literal element
On axis I'm generating the client with WSDL2Java (on the 2/6/02 release)
with the only arguments -o and the wsdl file.
The axis generated client seems to include an RPC style wrapper element
around all messages regardless of whether their style is rpc or document.
This doesn't seem right to me. Is this expected, or am I doing
something wrong in how I generate the client?
I've included the resulting messages captured with TCPTunnel
in an attachment.
Thanks for any information.
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns1:RPCTypeEncoded xmlns:ns1="http://test.axis/localNS">
<p1 xsi:type="xsd:int">10</p1>
</ns1:RPCTypeEncoded>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SOAP-ENV:Body> <RPCTypeLiteral xmlns="http://test.axis/dummy"> <p1>10</p1> </RPCTypeLiteral> </SOAP-ENV:Body> </SOAP-ENV:Envelope> <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SOAP-ENV:Body> <ns1:RPCElementEncoded xmlns:ns1="http://test.axis/dummy"> <p1 href="#id0"/> </ns1:RPCElementEncoded> <multiRef id="id0" SOAP-ENC:root="0" xsi:type="ns2:element1" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://test.axis/dummy"> <a1 xsi:type="xsd:string">abc</a1> </multiRef> </SOAP-ENV:Body> </SOAP-ENV:Envelope> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SOAP-ENV:Body> <RPCElementLiteral xmlns="http://test.axis/dummy"> <a1>someString</a1> </RPCElementLiteral> </SOAP-ENV:Body> </SOAP-ENV:Envelope> <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SOAP-ENV:Body> <ns1:DocTypeEncoded xmlns:ns1="http://test.axis/dummy"> <p1 xsi:type="xsd:int">10</p1> </ns1:DocTypeEncoded> </SOAP-ENV:Body> </SOAP-ENV:Envelope> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SOAP-ENV:Body> <DocTypeLiteral xmlns="http://test.axis/dummy"> <p1>10</p1> </DocTypeLiteral> </SOAP-ENV:Body> </SOAP-ENV:Envelope> <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SOAP-ENV:Body> <ns1:DocElementEncoded xmlns:ns1="http://test.axis/dummy"> <p1 href="#id0"/> </ns1:DocElementEncoded> <multiRef id="id0" SOAP-ENC:root="0" xsi:type="ns2:element1" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://test.axis/dummy"> <a1 xsi:type="xsd:string">abc</a1> </multiRef> </SOAP-ENV:Body> </SOAP-ENV:Envelope> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SOAP-ENV:Body> <DocElementLiteral xmlns="http://test.axis/dummy"> <a1>someString</a1> </DocElementLiteral> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
<?xml version="1.0" encoding="utf-8"?> <definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://test.axis/dummy" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://test.axis/dummy" xmlns="http://schemas.xmlsoap.org/wsdl/"> <types> <s:schema elementFormDefault="qualified" targetNamespace="http://test.axis/dummy"> <s:element name="element1"> <s:complexType> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="a1" type="s:string" /> </s:sequence> </s:complexType> </s:element> </s:schema> </types> <message name="TypeMessage"> <part name="p1" type="s:int"/> </message> <message name="ElementMessage"> <part name="p1" element="s0:element1"/> </message> <message name="OutMsg"> </message> <portType name="PortType"> <operation name="RPCTypeEncoded"> <input message="s0:TypeMessage" /> <output message="s0:OutMsg" /> </operation> <operation name="RPCTypeLiteral"> <input message="s0:TypeMessage" /> <output message="s0:OutMsg" /> </operation> <operation name="RPCElementEncoded"> <input message="s0:ElementMessage" /> <output message="s0:OutMsg" /> </operation> <operation name="RPCElementLiteral"> <input message="s0:ElementMessage" /> <output message="s0:OutMsg" /> </operation> <operation name="DocTypeEncoded"> <input message="s0:TypeMessage" /> <output message="s0:OutMsg" /> </operation> <operation name="DocTypeLiteral"> <input message="s0:TypeMessage" /> <output message="s0:OutMsg" /> </operation> <operation name="DocElementEncoded"> <input message="s0:ElementMessage" /> <output message="s0:OutMsg" /> </operation> <operation name="DocElementLiteral"> <input message="s0:ElementMessage" /> <output message="s0:OutMsg" /> </operation> </portType> <binding name="Binding" type="s0:PortType"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /> <operation name="RPCTypeEncoded"> <soap:operation soapAction="" style="rpc" /> <input> <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://test.axis/localNS"/> </input> <output> <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="RPCTypeLiteral"> <soap:operation soapAction="" style="rpc" /> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="RPCElementEncoded"> <soap:operation soapAction="" style="rpc" /> <input> <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="RPCElementLiteral"> <soap:operation soapAction="" style="rpc" /> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="DocTypeEncoded"> <soap:operation soapAction="" style="document" /> <input> <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="DocTypeLiteral"> <soap:operation soapAction="" style="document" /> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="DocElementEncoded"> <soap:operation soapAction="" style="document" /> <input> <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="DocElementLiteral"> <soap:operation soapAction="" style="document" /> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> </binding> <service name="Service"> <port name="Port" binding="s0:Binding"> <soap:address location="http://localhost:9080/dummy" /> </port> </service> </definitions>
