Reputation: 2137
I have following XML in which i want to post record in 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>
Upvotes: 0
Views: 1715
Reputation: 42016
Create Soap object, and just use addProperty()
to pass parameter.
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request .addProperty("key", value);
Dealing with SOAP
in your case:
request.addProperty( "ProductNumber","something");
request.addProperty( "Quantity","something");
request.addProperty( "Price","something");
Upvotes: 1