|
Re: NuSOAP client w/WSDL not returning value: msg#00038php.nusoap.general
The problem is in the server code. $server->register('add',array('carrierId'=>'xsd:int'), array('return'=>'xsd:boolean'), $namespace); $server->register('add'); The second call to register 'add' will override the first call. The second call specifies neither input nor output/return parameters, which has the effect of saying that the add method returns void, i.e. nothing. Get rid of that second register call, and the code works fine. 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: "Andrew Pasetti" <andrew.pasetti@xxxxxxxxxxx> To: <nusoap-general@xxxxxxxxxxxxxxxxxxxxx> Sent: Monday, April 11, 2005 5:36 PM Subject: [Nusoap-general] NuSOAP client w/WSDL not returning value Hello, I'm having trouble getting my server to return a value to the client. Perhaps someone can look at the code below and suggest what I am doing wrong. All the function does is return true. Unfortunately, nothing is being returned when I execute the client. Thanks, Andrew #### Server Code www.easy411.com/webservices/server.php #### include_once($_SERVER["DOCUMENT_ROOT"]."/classes/soap/nusoap.php"); $server = new soap_server; $namespace = 'http://www.easy411.com/webservices/server.php'; $server->configureWSDL('Accounts',$namespace); $server->wsdl->schemaTargetNamespace = $namespace; $server->register('add',array('carrierId'=>'xsd:int'), array('return'=>'xsd:boolean'), $namespace); $server->register('add'); function add($carrierId) { return true; } $server->service($HTTP_RAW_POST_DATA); #### Client Code www.easy411.com/webservices/client.php #### include_once($_SERVER["DOCUMENT_ROOT"]."/classes/soap/nusoap.php"); $server = new soap_server; $client = new soapclient('http://easy411.com/webservices/server.php?wsdl', true); $err = $client->getError(); if ($error = $client->getError()) { echo $error; exit; } $result = $client->call('add',array('carrierId'=>1)); if ($fault = $client->fault) { echo $fault; exit; } if ($error = $client->getError()) { echo $error; exit; } else { echo "result=$result"; } ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | NuSOAP client w/WSDL not returning value: 00038, Andrew Pasetti |
|---|---|
| Next by Date: | Problem consuming dot net webservice usign nusoap.: 00038, Amol Dalvi |
| Previous by Thread: | NuSOAP client w/WSDL not returning valuei: 00038, Andrew Pasetti |
| Next by Thread: | Problem consuming dot net webservice usign nusoap.: 00038, Amol Dalvi |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |