I have the following code:
$telnums = array(10, 20, 30); $obj = new StdClass(); $obj->telnums = new StdClass(); foreach ($telnums as $telnum) { $obj->telnums = $telnum; } call_user_func(array($this->client, 'createDomain'), new SoapVar($obj, SOAP_ENC_OBJECT));
There $ this-> client is an instance of the SoapClient class.
And it generates the following query:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="..."> <SOAP-ENV:Body> <ns1:createDomain> <createDomainRequest> <telnums>30</telnums> </createDomainRequest> </ns1:createDomain> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
But i need
<createDomainRequest> <telnums>10</telnums> <telnums>20</telnums> <telnums>30</telnums> </createDomainRequest>
How can i achieve this?
PS: PHP 5.2.6-3ubuntu4.5 with Suhosin-Patch 0.9.6.2 (cli) (built: Jan 6, 2010 10:25:33 PM)
Thanks in advance!
soap php soap-client
Slava semushin
source share