note 98184 added to soapserver.soapserver

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
@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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.