Complex Array Like :
$id = "value";
$customer = array("key" => "value", "key" => "value");
$set = $soap->call($sessionID, 'abc.set', array($id, $customer));
How to send request form android with this type of complex array in soap.
I am using ksoap2
library for sending request in magneto soap.
In SoapUi Software formatting of calling this type of complex array like :
<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>
Step 1 : In ksoap or ksoap2 no direct support to send Array. so you can create a SoapObject with method name(which you need to create array)
Step 2 : then create arrayType method(optional depends on your WSDL) and add this soapObject to that array Object as a property
Step 3 : finally add the array to your main soap call
NOTE : the steps varies depends on the your WSDL, sometimes you can directly add 1st step object as a parameter, this depends on WSDL.