|
Re: nusoap : array parameter: msg#00048php.nusoap.general
The int type is defined by XML Schema, not your WSDL. Therefore, the lines array( array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:int[]') ), 'tns:int' should be array( array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:int[]') ), 'xsd:int' 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: "Philippe BOUDIN " <pboudin@xxxxxxxxxxxx> To: <nusoap-general@xxxxxxxxxxxxxxxxxxxxx> Sent: Tuesday, April 13, 2004 7:37 AM Subject: [Nusoap-general] nusoap : array parameter hello, first i apologize for my bad english. I would like to do a service with a function which have an integer array for parameter. I did a complex type in service which name is NotesArray : $server->wsdl->addComplexType( 'NotesArray', 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array( array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:int[]') ), 'tns:int' ); ********************************* I use NotesArray as parameter in my function service. There is something like that : $server->register('myFunction', // method name array('notes'=>'tns:NotesArray'), // input parameters array('return' => 'xsd:string'), // output parameters 'urn:myService', // namespace 'urn:myService#myFunction', // soapaction 'rpc', // style 'encoded', // use 'My documentation' // documentation ); // Define the method as a PHP function function myFunction($notes) { $moy = "".$notes[0]; //just for exemple return the first number as a string return $moy; } ********************************* I'm not able to use it in a client. My browser show me this message : "wsdl error: urn:calcul:int (int) is not a supported type." I have this source : $theArray = array(10, 11, 12, 13); // Call the SOAP method $result = $client->call('moyenne', array('notes' => $theArray)); Anyone understands me and can resolve my probleme ? Thanks a lot Philippe Incroyable ! des SMS offerts avec CaraMail Premium - http://www.caramailmax.com ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | nusoap : array parameter: 00048, Philippe BOUDIN |
|---|---|
| Next by Date: | Re: Re: abstract type using nusoap causing error: 00048, Scott Nichol |
| Previous by Thread: | nusoap : array parameteri: 00048, Philippe BOUDIN |
| Next by Thread: | Re: abstract type using noose causing error: 00048, Matthew Sobocinski |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |