Re: PEAR::SOAP problems
| From: | Sandro Zic | Date: | Fri, 21 Mar 2003 09:22:07 +0000 |
| Subject: | Re: PEAR::SOAP problems | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-14521@lists.php.net to get a copy of this message | ||
Hi,
there has been no reaction to my email yet.
Please let me know if there are any comments on the below cases and if
patches are welcome.
Cheers!
Sandro
On Saturday 15 March 2003 18:46, Sandro Zic wrote:
> 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