RE: pear::soap array return problem

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

 




> -----Original Message-----
> From: Mike Evans [mailto:mike@arl.arizona.edu] 
> Sent: 17 February 2004 15:34
>
> Sorry, I'm new here and saw that there wasn't archives for 
> the group... 
> so accept my apologies if this has been covered before.
> 
> I'm building a Webservice with PEAR::SOAP and need to be able 
> to return 
> an unknown number of a particular result.  So far I have this 
> in my Class:
> 
> $this->__typedef['{http://lifesci.ibsb.arizona.edu/}publication'] =
>                    array('authors' => 'string',
>          		'pub_date'=> 'string',
>          		'title'	=> 'string',
>          		'source'=> 'string',
>          		'volume'=> 'string',
>          		'pages'=> 'string'
>                           );
> 
> $this->__dispatch_map['getPubs'] = array('in' => 
> array('netid' => 			 
> 'string', 'publimit' => 'int'),
> 			'out' => array(	'publications' => 
> '{http://lifesci.ibsb.arizona.edu/}publications' ));
> 
> The problem is, I'm not sure how many publications will be 
> returned from 
> the getPubs() method.  Any tips on I can handle this?

Would you not handle it like you would with any array of n size? Foreach() ?
While() ?

A problem I encountered is if the returned data is only a single item
sometimes, PEAR::SOAP doesn't seem to build it up on the PHP client side as
an array of size 1. Instead it creates an object from the values.

- Mike C.


________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________

-- 
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