我希望发送一个像
这样的请求<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>
我得到的是
<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>
代码是
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");
当我使用SoapUI与第二个“connectionId”swdped似乎工作可以任何人帮助。有想法。 我已经查看了几乎每个ksoap问题,似乎无法找到答案?
答案 0 :(得分:0)
尝试更改:
request.addSoapObject(message);
request.setProperty(0, "connectionId");
为:
request.setProperty(0, "connectionId");
request.addSoapObject(message);
答案 1 :(得分:0)