logo       

nusoap : array parameter: msg#00047

php.nusoap.general

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

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise