PEAR::SOAP problems
| From: | Sandro Zic | Date: | Sat, 15 Mar 2003 17:46:01 +0000 |
| Subject: | PEAR::SOAP problems | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-14320@lists.php.net to get a copy of this message | ||
Hi,
some problems with PEAR::SOAP:
1) hiding private properties
when trying to transfer a struct with underscore keys like '_id' from a
PEAR::SOAP server to a PEAR::SOAP client, I realized that it hides them from
the output. This means that the client will not receive a return value from a
remote procedure returning an array like
return array('_key' => 'value');
I guess this has been done to protect private properties of PHP classes, but I
doubt this is the correct behaviour of a SOAP implementation, because the
remote procedure should care about hidden properties, not the SOAP transport
layer.
Is there an option to turn this off?
2) replacing numeric keys with 'item'
For my application, I tried to call a remote procedure which is itself named
call() and again calls another function, e.g.
$client = new SOAP_Client('http://www.example.com/');
$client->call('call', array('some_function', array($val1, $val2)));
This executes the remote call() function which is supposed to execute
some_function() with the given parameters $val1 and $val2. The problem is
that PEAR::SOAP_Server::buildResponse() replaces numeric keys with 'item',
thus I cannot properly recreate the $val1 and $val2 parameters from the array
they have been assigned to. So I cannot pass them to some_function() and even
the 'some_function' value disappears from the arguments list.
This gave me some headache to find out and I wonder why this is done and if
this could be done differently (more transparently) or if there's a
work-around.
Cheers!
Sandro