Re: FW: SV: [SOAP] SoapServer & SoapFault
| From: | FENDT Charles | Date: | Thu, 24 Feb 2005 09:06:37 +0000 |
| Subject: | Re: FW: SV: [SOAP] SoapServer & SoapFault | ||
| References: | 1 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-1753@lists.php.net to get a copy of this message | ||
David Kingma | jool.nl a écrit :
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 {-----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
$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