Is there a way to specify a typedef for an array that could possibly contain different types, i.e. array of mixed? I'm not even sure if this is possible in the SOAP spec but it would be incredibly useful for one of my applications. Thanks! -Javier -----Original Message----- From: Chris Coe [mailto:info@intelligentstreaming.com] Sent: Monday, September 08, 2003 10:46 AM To: soap@lists.php.net Subject: Re: [SOAP] [pear::soap - wsdl] Dispatch map for returning arrays (newbie) 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 -- PHP Soap Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php