note 78197 added to function.soap-soapvar-construct
| From: | fahadDOTshehzadATgmail dot com at osu1 dot php dot net | Date: | Tue, 02 Oct 2007 18:56:58 +0000 |
| Subject: | note 78197 added to function.soap-soapvar-construct | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-130993@lists.php.net to get a copy of this message | ||
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>
----
Server IP: 69.147.83.197
Probable Submitter: 203.81.197.32
----
Manual Page -- http://www.php.net/manual/en/function.soap-soapvar-construct.php
Edit -- https://master.php.net/note/edit/78197
Del: integrated -- https://master.php.net/note/delete/78197/integrated
Del: useless -- https://master.php.net/note/delete/78197/useless
Del: bad code -- https://master.php.net/note/delete/78197/bad+code
Del: spam -- https://master.php.net/note/delete/78197/spam
Del: non-english -- https://master.php.net/note/delete/78197/non-english
Del: in docs -- https://master.php.net/note/delete/78197/in+docs
Del: other reasons-- https://master.php.net/note/delete/78197
Reject -- https://master.php.net/note/reject/78197
Search -- https://master.php.net/manage/user-notes.php