複數排列喜歡:在android中如何使用ksoap2庫發送magento中的複雜數組?
$id = "value";
$customer = array("key" => "value", "key" => "value");
$set = $soap->call($sessionID, 'abc.set', array($id, $customer));
如何發送請求形式機器人與這種類型的皁複雜陣列。
我使用ksoap2
庫在磁肥皂發送請求。
在調用此類型複雜陣列的像的SOAPUI軟件格式:
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:Magento" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://xml.apache.org/xml-soap" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<call>
<sessionId xsi:type="xsd:string">??</sessionId>
<resourcePath xsi:type="xsd:string">abc.set</resourcePath>
<args xsi:type="SOAP-ENC:Array">
<item xsi:type="xsd:int">id</item>
<item xsi:type="ns2:Map">
<item>
<key xsi:type="xsd:string">key</key>
<value xsi:type="xsd:string">value</value>
</item>
<item>
<key xsi:type="xsd:string">key</key>
<value xsi:type="xsd:string">value</value>
</item>
<item>
<key xsi:type="xsd:string">key</key>
<value xsi:type="xsd:string">value</value>
</item>
</item>
</args>
</call>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
我得到了解決方案https://groups.google.com/forum/#!topic/ksoap2-android/OeP-jWVLZMw –