Welcome to WebmasterWorld Guest from 54.159.12.17

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

[SOAP] Returning array value

     

fm86

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

5+ Year Member



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

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

WebmasterWorld Senior Member eelixduppy is a WebmasterWorld Top Contributor of All Time 5+ Year Member



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.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month