![](/img/trans.png)
[英]How to bind a SOAP web service response data to a SpinnerView in Android?
[英]How to post data in SOAP web service
我有以下XML,我想在其中記錄ProductNumber , Quantity , Price的記錄 。
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<QueryPrices xmlns="xyz">
<strSessionKey>string</strSessionKey>
<nDiscountID>int</nDiscountID>
<objOrderItems>
<OrderItem>
<ProductNumber>int</ProductNumber>
<Quantity>int</Quantity>
<Price>float</Price>
</OrderItem>
<OrderItem>
<ProductNumber>int</ProductNumber>
<Quantity>int</Quantity>
<Price>float</Price>
</OrderItem>
</objOrderItems>
</QueryPrices>
</soap:Body>
</soap:Envelope>
創建Soap對象,然后使用addProperty()
傳遞參數。
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request .addProperty("key", value);
處理SOAP
在您的情況下:
request.addProperty( "ProductNumber","something");
request.addProperty( "Quantity","something");
request.addProperty( "Price","something");
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.