note 78197 rejected from function.soap-soapvar-construct by ezyang
| From: | ezyang@php.net | Date: | Wed, 03 Oct 2007 01:20:19 +0000 |
| Subject: | note 78197 rejected from function.soap-soapvar-construct by ezyang | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-131000@lists.php.net to get a copy of this message | ||
Note Submitter: fahad DOT shehzad AT gmail.com
----
Hi there,
is there a way to tell php to use a member variable as attribute of a node instead of putting it as
child element when it generates a Soap Request???
<?php
class Game{
private $id;
private $type;
private $title;
}
$oGame = new Game();
$SoapGame = new SoapVar($oGame, SOAP_ENC_OBJECT, NULL, NULL, 'Game', SOME_NAME_SPACE);
?>
is there a way i can tell $type should be the attribute of Game instead of child element so that it
can produce some think like this
<game type='SomeType'>
<id>?</id>
<title>?</title>
</game>
Right now it is producing
<game>
<id>?</id>
<title>?</title>
<type>SomeType</type>
</game>