note 98184 added to soapserver.soapserver
| From: | paulabean73 at gmail dot com | Date: | Mon, 31 May 2010 12:37:31 +0000 |
| Subject: | note 98184 added to soapserver.soapserver | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-169745@lists.php.net to get a copy of this message | ||
@nilzor at gmail dot com 12-May-2010 10:04
It seems that when using a WSDL (for example with a .NET client) the function's arguments are
wrapped inside a stdClass. What get_object_vars() does is simply turn the (visible) properties of an
object into an associative array.
You could also just do:
<?php
function SomeFunction($data)
{
return Array("SomeFunctionResult" => $data->param1 + $data->param2);
}
?>
You could probably also wrap the return value in a stdClass (or better yet, specify a class map).
----
Server IP: 83.137.20.135
Probable Submitter: 82.175.129.212
----
Manual Page -- http://www.php.net/manual/en/soapserver.soapserver.php
Edit -- https://master.php.net/note/edit/98184
Del: integrated -- https://master.php.net/note/delete/98184/integrated
Del: useless -- https://master.php.net/note/delete/98184/useless
Del: bad code -- https://master.php.net/note/delete/98184/bad+code
Del: spam -- https://master.php.net/note/delete/98184/spam
Del: non-english -- https://master.php.net/note/delete/98184/non-english
Del: in docs -- https://master.php.net/note/delete/98184/in+docs
Del: other reasons-- https://master.php.net/note/delete/98184
Reject -- https://master.php.net/note/reject/98184
Search -- https://master.php.net/manage/user-notes.php