|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-09-09 12:54 UTC] amr dot mostafa at gmail dot com
Description:
------------
Calling SoapServer->fault() causes execution to terminate, there is no way for the developer to get the XML response itself and process it differently.
Reproduce code:
---------------
$server = SoapServer(NULL, array('location' => 'http://example.com', 'uri' => 'http://example.com'));
$server->fault('foo', 'bar');
echo 'We are past $sever->fault()!'
Expected result:
----------------
We are past $server->fault()!
Actual result:
--------------
"We are past $server->fault()!" is never printed, only the XML for the SOAP Fault is.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 21:00:01 2025 UTC |
This behavior is very undesirable! How can I let a client know about the fault _and_ do server-side Exception handling? I'd love to do try { $server->handle(); } catch (Exception $e) { $server->fault($e->getCode(), $e->getMessage()); throw $e; } To have default handling for uncaught Exceptions (which logs to file, email, whatever), but that's not possible.