soap wrong xml serialization



I have a wsld definition that looks like



...
<sequence>
<element name="version" nillable="false" type="xsd:string"/>
<element name="payment" nillable="false" type="tns1:payment"/>
...
</sequence>
...


This is the xml log of the request that is sent



<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns0="http://ift.tt/1oN8dni" ...>
<SOAP-ENV:Header/>
<ns2:Body>
<ns0:doWebPaymentRequest>
<ns0:version>
<ns0:version>4</ns0:version>
<ns0:payment>
<ns1:amount>33300</ns1:amount>
...
</ns0:payment>
</ns0:version>
...


So suds encloses a payment object into version (a string), and it breaks the request. Why is that ?? Any way to go around this ?


No comments:

Post a Comment