homepage Welcome to WebmasterWorld Guest from 174.129.103.100
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
[SOAP] Returning array value
fm86




msg:4107079
 4:56 pm on Mar 30, 2010 (gmt 0)

Hi everybody!

I'm new in the world of SOAP and web services. I developed a server which returns a string extracted from a database in function of a client script's parameter.

My question is: is it possible to return an array to the client? How do I do that? I use this code to create the service:

$server->register("getPast",
array('year' => 'xsd:int'),
array('return' => 'xsd:string'),
'urn:stockquote',
'urn:stockquote#getPast');

So I guess I should put something like xsd:array but array is not a type in XML specification... So, are there other options?

Thank you for you attention

 

eelixduppy




msg:4124931
 2:11 pm on Apr 30, 2010 (gmt 0)

You wouldn't have an "array" per se...instead you would just have to set up the XML properly. For example:

<m:Name>
<m:Item>one</m:Item>
<m:Item>two</m:Item>
<m:Item>three</m:Item>
</m:Name>


Something like that, no? I'm very rusty with SOAP as I haven't touched it for quite some time.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved