note 110402 added to soapclient.soapcall

From: Date: Thu, 18 Oct 2012 15:49:00 +0000
Subject: note 110402 added to soapclient.soapcall
Groups: php.notes 
Request: Send a blank email to php-notes+get-191426@lists.php.net to get a copy of this message
If you're using a custom class object as a parameter (or nested within your parameters), and you store your data in a $_data[] attribute variable, you need to implement the __get($key) method in that custom class, or your data won't translate/convert into the XML. class ColorParam { private $_data = array(); public function __get($key) { return $this->_data[$key]; } public function setBackground($data) { $this->_data['background'] = $data; } } $client = new SoapClient($wsdl); $colorParam= new ColorParam(); $colorParam->setBackground('blue'); $client->sampleImageCall($colorParam); ---- Server IP: 69.147.83.199 Probable Submitter: 204.62.150.2 ---- Manual Page -- http://www.php.net/manual/en/soapclient.soapcall.php Edit -- https://master.php.net/note/edit/110402 Del: integrated -- https://master.php.net/note/delete/110402/integrated Del: useless -- https://master.php.net/note/delete/110402/useless Del: bad code -- https://master.php.net/note/delete/110402/bad+code Del: spam -- https://master.php.net/note/delete/110402/spam Del: non-english -- https://master.php.net/note/delete/110402/non-english Del: in docs -- https://master.php.net/note/delete/110402/in+docs Del: other reasons-- https://master.php.net/note/delete/110402 Reject -- https://master.php.net/note/reject/110402 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#191426) next »