|
Re: Quick Question...: msg#00141php.nusoap.general
I don't know whether you want to support WSDL or not, but here are some pieces of code from the interop code. // add a type to the WSDL for an array of string $server->wsdl->addComplexType( 'ArrayOfstring', 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:string[]')), 'xsd:string' ); // register a function returning an array of string // note that the namespace prefix "si" corresponds to the namespace for the types // we defined in this application; other applications should use the prefix "tns" // also note that other applications would use a different namespace for // the function (the last parameter passed to register) $server->register('echoStringArray', array('inputStringArray'=>'si:ArrayOfstring'), array('return'=>'si:ArrayOfstring'), 'http://soapinterop.org/'); // the function itself function echoStringArray($inputStringArray){ return $inputStringArray; } The "echo" functions from the interop test are pretty artificial. You might have something like function foo() { $ret[] = 'element 0'; $ret[] = 'element 1'; $ret[] = 'element 2'; return $ret; } Scott Nichol Do not send e-mail directly to this e-mail address, because it is filtered to accept only mail from specific mail lists. ----- Original Message ----- From: "Dennis Morgan" <dennis.morgan@xxxxxxxxxx> To: <nusoap-general@xxxxxxxxxxxxxxxxxxxxx> Sent: Tuesday, May 25, 2004 7:14 PM Subject: [Nusoap-general] Quick Question... > Hi Everyone, > this may be a dumb question and probably is straight forward.. > > Is there a way to return an array from a function call.. at present i need > to > find a way to have a function pass back 3 bits of data. all XSD:String. > > If anyone as any idea how i could pull this off it would be a big help.. > regards, > Dennis > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click > _______________________________________________ > Nusoap-general mailing list > Nusoap-general@xxxxxxxxxxxxxxxxxxxxx > https://lists.sourceforge.net/lists/listinfo/nusoap-general > ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id?66&op=click |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Quick Question...: 00141, Nergis Kilinç |
|---|---|
| Next by Date: | Re: Quick Question...: 00141, Dennis Morgan |
| Previous by Thread: | Re: Quick Question...i: 00141, Scott Nichol |
| Next by Thread: | viewing the soap envelope without sending it: 00141, David Felton |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |