0
我必須調用一個Web服務,通過kSoap2方法調用Web服務,現在在這一個節點中是一個子對象,所以我可以通過它。KSoap2通過子對象
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:AddDataVersion2>
<!--Optional:-->
<tem:object>
<!--Optional:-->
<tem:Data1>?</tem:Data1>
<!--Optional:-->
<tem:Data2>?</tem:Data2>
<!--Optional:-->
<tem:Data3>?</tem:Data3>
<!--Optional:-->
<tem:Data4>?</tem:Data4>
<tem:object>
</tem:AddDataVersion2>
</soapenv:Body>
</soapenv:Envelope>
此子對象=如何將數據添加到對象,並添加對象
SoapObject request = new SoapObject(NAMESPACE,"tem:AddDataVersion2");
request.addProperty("Data1", 1);
request.addProperty("Data2", 2);
request.addProperty("Data3", 3);
request.addProperty("Data4", 4);