Re: [SOAP] [pear::soap - wsdl] Dispatch map for returning arrays (newbie)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 20:03 07/09/2003, Luis Ferrao wrote:
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(' ???? => ???? '), ); ________________________________________________________

Although there may be a less convoluted way, you could define a type which represents arrays of strings (or whatever your output elements are), and refer to this type in your dispatch map:

define('MY_NS', '{http://foo.bar}');

$this->__typedef[MY_NS.'ArrayOfString'] = array(array('item' => 'string'));

$this->__dispatch_map['testDB'] =
    array('in' => array('inputStringSimple' => 'string'),
          'out' => array('databaseOutput' => MY_NS.'ArrayOfString'));

Since you have to specify a type name in the dispatch_map in/out values,
and no 'array of string' type exists by default, you have to define one.

ps: if someone can at least point me to some dispatch map examples it would
be great.

If you need a specific example, just ask :-)


Hope that helps.

Best,

Chris.

--
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux