这是我的代码,我想通过ksoap2发送。数组中的对象为我创造了问题。
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Magento" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<soapenv:Header/>
<soapenv:Body>
<urn:shoppingCartProductAdd soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<sessionId xsi:type="xsd:string">87a9cd5964e2dc1bf19a946a59a6175a</sessionId>
<quoteId xsi:type="xsd:int">716</quoteId>
<storeId xsi:type="xsd:string">1</storeId>
<products xsi:type="urn:shoppingCartProductEntityArray" soapenc:arrayType="urn:shoppingCartProductEntity[]">
<shoppingCartProductEntity>
<product_id>500</product_id>
<qty>1</qty>
</shoppingCartProductEntity>
</products>
</urn:shoppingCartProductAdd>
</soapenv:Body>
</soapenv:Envelope>
答案 0 :(得分:0)
只是忽略<shoppingCartProductEntity>
,一切都适合我。