Encoding arbitrary nested PHP arrays
| From: | Antonio Ognio | Date: | Sat, 04 Jan 2003 00:27:02 +0000 |
| Subject: | Encoding arbitrary nested PHP arrays | ||
| Groups: | php.soap | ||
| Request: | Send a blank email to php-soap+get-364@lists.php.net to get a copy of this message | ||
Hello everybody,
I'm new to the list and very happy to see we've
now got quality libraries for working with SOAP
using PHP.
I've been studying the code of the SOAP pear
module from CVS and can't figure out how to
correctly encode an arbitrary array with
elements that can be simple data types like
integers and strings as well as other arrays.
I've been playing with the decoding bits and
it's pretty advanced, so decoding seems not
to be a problem.
My question is:
If I have an arbitrary PHP array holding
more simple types and other PHP arrays,
how do I correctly generate a SOAP
message with PEAR's SOAP module using
SOAP's Schema encoding????
I've seen there are some flags you can
turn ON/OFF on the libraries and also
that the current implementation prefers
to map complex types into PHP Objects.
My goal is to avoid having to previously
define a class for handling the Struct,
since it's the great flexibility of
PHP's array what I use in my application
and now all I need is to transport
this arrays from one place to another
using SOAP for RMI.
Thanks a lot,
Antonio Ognio
Lima-Peru