Re: FW: SV: SoapServer & SoapFault

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Kingma | jool.nl a écrit :
-----Original Message-----
The problem is with server own SoapFaults and my SoapFaults...
It s possible for me not to send SoapFault in my daemon...
The typical problem is a query error...
handle() never give me the hand...
I use ob_start() to catch the soap response to redirect it on the client socket.
It work fine...
But if a soap fault is send, my code is never executed... and the soapfault is printed on stdout!!!


The way I solved such a problem (for logging and db transaction purposes) is
to throw an Exception instead of a soapFault.
Try{server->handle()}catch(Exception $e){do the logging and return a manual
soap fault with the same message as the exception}

Regards,

David

I already try... it's haw it work with SoapClient... Try{$client->__call($function, $param)}catch(SoapFault $fault) {...} But SoapServer::handle() return nothing: no data, no exception... I catch nothing just try: <?php $server = new SoapServer(null, "http://test/";); try { $server->handle("this is not a valid soap query"); } catch (Exception $e) { echo "I catch the Error !!! \n"; } ?>

Some other idee ???
I didn't have more...

regards

FENDT Charles

--
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux