I need to interact with a SOAP service and am having a lot of trouble doing so; would really appreciate any pointers on this. The original error message was:
org.apache.axis2.databinding.ADBException: Any type element type has not been given
After some research, it turns out that this is a disagreement between SUDS and the server has to how deal with
type="xsd:anyType"
on the element in question.
I've confirmed using SOAPUI and after advice that the problem can be fixed by taking these steps:
- Adding xsi:type="xsd:string" to each element which causes problems
- Adding xmlns:xsd="http://www.w3.org/2001/XMLSchema" to the SOAP Envelope
So, where SUDS currently does this:
<SOAP-ENV:Envelope ... xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<ns3:Body>
<ns0:method>
<parameter>
<values>
<table>
<key>EMAIL_ADDRESS</key>
<value>example@example.org</value>
</table>
</values>
</parameter>
</ns0:method>
it should instead produce this:
<SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" ... xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<ns3:Body>
<ns0:method>
...
<parameter>
<values>
<table>
<key xsi:type="xsd:string">EMAIL_ADDRESS</key>
<value xsi:type="xsd:string">example@example.org</value>
</table>
</values>
</parameter>
</ns0:method>
Is there a correct way to do this? I've seen suggestions of using ImportDoctor or MessagePlugins, but haven't really grokked how to achieve the desired effect.