private properties + numeric keys
| From: | Sandro Zic | Date: | Fri, 21 Mar 2003 10:11:38 +0000 |
| Subject: | private properties + numeric keys | ||
| Groups: | php.soap | ||
| Request: | Send a blank email to php-soap+get-494@lists.php.net to get a copy of this message | ||
Hi,
I was told at pear-dev that my below questions are better sent to this list.
The PEAR::SOAP version I used is 0.7.1
Thanks for any help,
Sandro
---------- Forwarded Message ----------
Subject: [PEAR-DEV] PEAR::SOAP problems
Date: Sat, 15 Mar 2003 18:46:01 +0100
From: Sandro Zic <sandro.zic@zzoss.com>
To: pear-dev@lists.php.net
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
--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
-------------------------------------------------------