复杂数组如:
$id = "value";
$customer = array("key" => "value", "key" => "value");
$set = $soap->call($sessionID, 'abc.set', array($id, $customer));
如何在soap中使用这种类型的复杂数组发送请求表单android。
我正在使用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>