note 98184 deleted from soapserver.soapserver by danbrown
| From: | danbrown@php.net | Date: | Tue, 01 Jun 2010 14:48:03 +0000 |
| Subject: | note 98184 deleted from soapserver.soapserver by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-169790@lists.php.net to get a copy of this message | ||
Note Submitter: paulabean73 at gmail dot com
----
@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).