I am having the same issue presented here. http://stackoverflow.com/questions/1294975/specify-order-of-elements-in-a-soap-response-using-java
Out of fear of my post in that thread not being answered, i have posted a new question as it is slightly different also.
I am utilising Tomcat 5.5 and Axis 1.4. Created Java classes from WSDL code and proceeded to deploy on Tomcat., then progressed to utilise soapUI as a client-side test.
My issue is slightly different but very much so related.
I am wanting to match an output sample i have, but i am receving a slightly different soap response and I am not sure what to do.
This is the code i am trying to match to.
<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:creditCardManualPaymentUResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="test.pay.mill.com">
<receiptDetails href="#id0"/>
<transactionResultU href="#id1"/>
</ns1:creditCardManualPaymentUResponse>
<multiRef id="id1" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:TransactionResultU" xmlns:ns2="test.pay.mill.com">
<responseCode xsi:type="xsd:string">0</responseCode>
<responseText xsi:type="xsd:string">Successful.</responseText>
<transactionId xsi:type="xsd:string">102</transactionId>
</multiRef>
<multiRef id="id0" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:ReceiptDetails" xmlns:ns3="test.pay.mill.com">
<receipt xsi:type="xsd:string">0900057636</receipt>
<Balance xsi:type="xsd:int">24000</Balance>
<ExpiryDate xsi:type="xsd:string">20101210</ExpiryDate>
</multiRef>
</soapenv:Body>
</soapenv:Envelope>
And this is what i am seeing through soapUI,
<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:creditCardManualPaymentUResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="test.pay.mill.com">
<receiptDetails href="#id0"/>
<transactionResultU href="#id1"/>
</ns1:creditCardManualPaymentUResponse>
<multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:TransactionResultU" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="test.pay.mill.com">
<responseCode xsi:type="xsd:string">test again</responseCode>
<responseText xsi:type="xsd:string">Successful</responseText>
<transactionId xsi:type="xsd:string">13</transactionId>
</multiRef>
<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:ReceiptDetails" xmlns:ns3="test.pay.mill.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<receipt xsi:type="xsd:string">1571018999</receipt>
<Balance href="#id2"/>
<ExpiryDate xsi:type="xsd:string">20120101</ExpiryDate>
</multiRef>
<multiRef id="id2" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">432</multiRef>
</soapenv:Body>
</soapenv:Envelope>
Notice how there is an extra multiRef created for the Balance variable in the soapUI response. Any ideas what needs to be done to obtain a response that matches the first code?
Thanks for reading, colpwd