I've been using Axis 1.1 for a while and recently needed to work with attachments. I thought of moving to the 1.2 version since it has better support for those.
Here is my scenario... I'm using Axis (generated classes & its libraries) to talk to another server using Wrapped/Literal. The WSDL that I use to generate my stubs uses style="wrapped". But the Stub that gets generated, has a
oper.setStyle(org.apache.axis.enum.Style.DOCUMENT);.
When I use this stub to talk to the server, the request that goes out is not wrapped. The parameters are getting passed directly in the SOAP body instead of getting wrapped.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<PARAM1 xmlns="http://www.somesite.com/services.xsd">data1</PARAM1>
<PARAM2 xmlns="http://www.somesite.com/services.xsd">data2</PARAM2>
<PARAM3 xmlns="http://www.somesite.com/services.xsd">data3</PARAM3>
<PARAM4 xmlns="http://www.somesite.com/services.xsd">data4</PARAM4>
</soapenv:Body>
</soapenv:Envelope>
<soapenv:Body>
<PARAM1 xmlns="http://www.somesite.com/services.xsd">data1</PARAM1>
<PARAM2 xmlns="http://www.somesite.com/services.xsd">data2</PARAM2>
<PARAM3 xmlns="http://www.somesite.com/services.xsd">data3</PARAM3>
<PARAM4 xmlns="http://www.somesite.com/services.xsd">data4</PARAM4>
</soapenv:Body>
</soapenv:Envelope>
I tried to manually edit the Stub to change the style to Style.WRAPPED. It then tries to send the message properly wrapped but the namespace gets sent as "".
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Body>
<METHOD_NAME xmlns="">
<PARAM1 xmlns="http://www.somesite.com/services.xsd">data1</PARAM1>
<PARAM2 xmlns="http://www.somesite.com/services.xsd">data2</PARAM2>
<PARAM3 xmlns="http://www.somesite.com/services.xsd">data3</PARAM3>
<PARAM4 xmlns="http://www.somesite.com/services.xsd">data4</PARAM4>
<PARAM1 xmlns="http://www.somesite.com/services.xsd">data1</PARAM1>
<PARAM2 xmlns="http://www.somesite.com/services.xsd">data2</PARAM2>
<PARAM3 xmlns="http://www.somesite.com/services.xsd">data3</PARAM3>
<PARAM4 xmlns="http://www.somesite.com/services.xsd">data4</PARAM4>
</METHOD_NAME>
</soapenv:Body>
</soapenv:Envelope>
</soapenv:Body>
</soapenv:Envelope>
In both scenarios, the server responds back with a Port not found. This was working on Axis1.1 and I'm not sure if I have to do anything different while generating the stubs for 1.2.
I would really appreciate any information/suggesions on this...
Thanks!
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!