NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Exceptions on server side.


Joined: 13 Apr 2009
Posts: 1
Reply with quote
Hi,
I have following problem.

Code:

$server = new nusoap_server();
$server->configureWSDL('SpNetWebService', $ns);
$server->wsdl->schemaTargetNamespace = $ns;

$server->register(
      'Hello',
      array(),
      array('return'=>'xsd:string'),
      $ns
      );

$HTTP_RAW_POST_DATA = isset($GLOBALS['HTTP_RAW_POST_DATA']) ? $GLOBALS['HTTP_RAW_POST_DATA'] : '';
$server->service($HTTP_RAW_POST_DATA);

//It is OK. I can get SoapException on client side.
function Hello()
   {
   return new nusoap_fault('SOAP-ENV:Client', '', 'Hello error.','Exception');
   }

//Not correct version. I can't get SoapException on client side.
function Hello()
   {
   try
     {
          throw new Exception("Exception");
     }
   catch (Exception $e)
     {
     return new nusoap_fault('SOAP-ENV:Client', '', 'Hello error.','Exception');
     }
   }
View user's profileFind all posts by mehanikSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
enable php log on the server, make sure it works (you may want to add php_error() calls to check this) and check if your script produces any errors. I see no reasons for your code to fail returning soap fault.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Exceptions on server side.
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic