note 101225 added to soapvar.soapvar
| From: | Krzych at osu1 dot php dot net | Date: | Fri, 03 Dec 2010 14:54:37 +0000 |
| Subject: | note 101225 added to soapvar.soapvar | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-174583@lists.php.net to get a copy of this message | ||
It might be obvious to some but not to everyone
if you ever wondered how to encode attribute in soap object, use proper coding and not hacking by
passing xml and flag XSD_ANYXML
try using this
<?
$amount['_'] = 25;
$amount['currencyId'] = 'GBP';
$encodded = new SoapVar($amount, SOAP_ENC_OBJECT);
?>
and end result wound be
<amount currencyId="GBP">25</amount>
hope that helps someone
----
Server IP: 87.124.126.105
Probable Submitter: 79.135.106.217 (proxied: 79.135.106.217)
----
Manual Page -- http://www.php.net/manual/en/soapvar.soapvar.php
Edit -- https://master.php.net/note/edit/101225
Del: integrated -- https://master.php.net/note/delete/101225/integrated
Del: useless -- https://master.php.net/note/delete/101225/useless
Del: bad code -- https://master.php.net/note/delete/101225/bad+code
Del: spam -- https://master.php.net/note/delete/101225/spam
Del: non-english -- https://master.php.net/note/delete/101225/non-english
Del: in docs -- https://master.php.net/note/delete/101225/in+docs
Del: other reasons-- https://master.php.net/note/delete/101225
Reject -- https://master.php.net/note/reject/101225
Search -- https://master.php.net/manage/user-notes.php