First thing to do was to disable "multirefs" output. This can be achieved by adding the following parameter in either the global configuration or service based configuration. Either way, output below shows the tag to disable sending "multiref" output:
The second option I tried was to turn on the "dotNetSoapEncFix". Again, this can be applied in the global or service configuration. Setting shown below:<parameter name="sendMultiRefs" value="false"/>
Unfortunately, I didn't have much luck with the "dotNetSoapEncFix" parameter. The last thing I tried was to change the output style to "wrapped". This option can only be turned on in the service tag. Here's how I did it:<parameter name="dotNetSoapEncFix" value="true"/>
After the server's restarted, the output is a lot shorter without the "soapenc" definitions which were causing the problems.<service name="myService" provider="java:RPC" style="wrapped"/>
Here's the output before setting the style to "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>
<ns1:function1 soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://com.testing">
<function1_Return xsi:type="ns2:Map" xmlns:ns2="http://xml.apache.org/xml-soap">
<item xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<key xsi:type="soapenc:string">DESC</key>
<value xsi:type="soapenc:string">EXCEPTION</value>
</item>
<item>
<key xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">STATUS</key>
<value xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">0</value>
</item>
</function1_Return>
</ns1:function1>
</soapenv:Body>
</soapenv:Envelope>
Here's the output after:
<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>
<function1 xmlns="http://com.testing">
<function1_Return>
<item xmlns:ns1="http://xml.apache.org/xml-soap" xmlns="">
<key xsi:type="xsd:string">DESC</key>
<value xsi:type="xsd:string">EXCEPTION</value>
</item>
<item xmlns="">
<key xsi:type="xsd:string">STATUS</key>
<value xsi:type="xsd:string">0</value>
</item>
</function1_Return>
</function1>
</soapenv:Body>
</soapenv:Envelope>
No comments:
Post a Comment