note 114701 added to soapvar.soapvar

From: Date: Wed, 26 Mar 2014 13:50:40 +0000
Subject: note 114701 added to soapvar.soapvar
Groups: php.notes 
Request: Send a blank email to php-notes+get-199044@lists.php.net to get a copy of this message
I spent hours trying to find how to send a request where an element is repeated. Here is how I managed to do it: <?php $parm = array(); $parm[] = new SoapVar('123', XSD_STRING, null, null, 'customerNo' ); $parm[] = new SoapVar('THIS', XSD_STRING, null, null, 'selection' ); $parm[] = new SoapVar('THAT', XSD_STRING, null, null, 'selection' ); $resp = $client->getStuff( new SoapVar($parm, SOAP_ENC_OBJECT) ); ?> This will send something like: <getStuff> <customerNo>123</customerNo> <selection>THIS</selection> <selection>THAT</selection> </getStuff> Hope this will save someone else's time. ---- Server IP: 72.52.91.14 Probable Submitter: 80.203.103.250 ---- Manual Page -- http://php.net/manual/en/soapvar.soapvar.php Edit -- https://master.php.net/note/edit/114701 Del: integrated -- https://master.php.net/note/delete/114701/integrated Del: useless -- https://master.php.net/note/delete/114701/useless Del: bad code -- https://master.php.net/note/delete/114701/bad+code Del: spam -- https://master.php.net/note/delete/114701/spam Del: non-english -- https://master.php.net/note/delete/114701/non-english Del: in docs -- https://master.php.net/note/delete/114701/in+docs Del: other reasons-- https://master.php.net/note/delete/114701 Reject -- https://master.php.net/note/reject/114701 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#199044) next »