2012-03-23 15 views
0

にXMLコードの行を交換することが可能です私は、私は何を得ることは石鹸

<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"); 

とき、私である

<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> 

のようなリクエストを送りたいです「connectionIdは」誰が助けることができ、動作するようには思えswapedと第二とのSOAPUIを使用しています。のアイデアを持っています。 私はそこにちょうど約あらゆるksoap質問を見てきましたし、答えを見つけるように見えるカント?

答えて

0

は変更してみてください:

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

へ:

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

申し訳ありません運が..同じ – John

+0

はちょうど私が値として間違ったのsetPropertyを使用している必要があり気づかなかったままのsetPropertyの結果として、テキストconnectionIdへの変更「をしました」。 – John

+0

それも不可能です。 – John

関連する問題