Is it possible to swap lines of xml code in soap

Posted by John on Stack Overflow See other posts from Stack Overflow or by John
Published on 2012-03-23T00:14:50Z Indexed on 2012/03/25 23:29 UTC
Read the original article Hit count: 244

Filed under:
|
|

I wish to send a request like

<v:Envelope xmlns:i="xxx">
 <v:Header />
 <v:Body>
  <sendTwoWaySmsMessage xmlns="xxx" id="o0" c:root="1">
   <connectionId i:type="d:string">connectionId</connectionId>
   <twoWaySmsMessage>
    <message i:type="d:string">love it. It seems to work</message>
    <mobiles i:type="d:string">345</mobiles>
    <messageId i:type="d:string">123</messageId>
   </twoWaySmsMessage>
   </sendTwoWaySmsMessage>
  </v:Body>
</v:Envelope>

what i get is

<v:Envelope xmlns:i="xxx">
 <v:Header />
 <v:Body>
  <sendTwoWaySmsMessage xmlns="xxx" id="o0" c:root="1">
   <twoWaySmsMessage>
    <message i:type="d:string">love it. It seems to work</message>
    <mobiles i:type="d:string">345</mobiles>
    <messageId i:type="d:string">123</messageId>
   </twoWaySmsMessage>
   <connectionId i:type="d:string">connectionId</connectionId>
   </sendTwoWaySmsMessage>
  </v:Body>
 </v:Envelope>

code is

SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE, url);
SoapObject message = new SoapObject("", "twoWaySmsMessage");
request.addProperty("connectionId", did);

message.addProperty("message", "love it. It seems to work");
message.addProperty("mobiles", "435");
message.addProperty("messageId", "123");

request.addSoapObject(message);
request.setProperty(0, "connectionId");

when i use SoapUI with the second with the "connectionId" swaped it seem to work can anyone help. of have ideas. I have looked at just about every ksoap question out there and cant seem to find an answer?

© Stack Overflow or respective owner

Related posts about android

Related posts about web-services