Re: [pear::soap - wsdl] Dispatch map for returning arrays (newbie)
| From: | Sören Fuhrmann | Date: | Mon, 08 Sep 2003 19:28:48 +0000 |
| Subject: | Re: [pear::soap - wsdl] Dispatch map for returning arrays (newbie) | ||
| References: | 1 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-1034@lists.php.net to get a copy of this message | ||
Hi,
You could also use a simple dispatch map like this:
$this->__dispatch_map['searchTest'] = array(
'in' => array('fields' => 'object'),
'out' => array('reslist' => 'array'));
Maybe this is not the elegant way, since the Type is not descripted very well, but it offers some flexibility, if necessary. E.g. you could use Variables of different Types in that Array. One Disadvantage is probably, that empty Variables are represented as "string [0]", since it's quite difficult to specify an empty variable.
I haven't found a perfect way to work with dynamic objects yet ... :)
Sören
Luis Ferrao schrieb:
Hi,
This is a very simple question.
Let's say i want to creat a function (say testDB) that returns arrays (i.e.
0 => zero, 1 => one, 2 => two, etc...) of unkown variable size. What should
my dispatch map look like ?
PHP:____________________________________________________
$this->__dispatch_map['testDB'] =
array('in' => array('inputStringSimple' => 'string'),
'out' => array(' ???? => ???? '),
);
________________________________________________________
Shane's talks example is OK for a fixed size array, i would like the same
for any size array. As you may have guessed, i'm dealing with database query
results which's size is unkhown.
This question has already been asked here by someone else but nobody
answerd, hopefuly i'll get some very needed help :)
Luis
ps: if someone can at least point me to some dispatch map examples it would
be great.