ZF-7806: Local client never throws SoapFault(s)

Issue Type: Bug Created: 2009-09-09T02:40:48.000+0000 Last Updated: 2012-11-20T20:53:20.000+0000 Status: Closed Fix version(s): Reporter: Amr Mostafa (alienbrain) Assignee: None Tags: - Zend_Soap_Client

Related issues: Attachments:


Zend_Soap_Client_Local doesn't correctly handle Soap Faults. Take the following code:

<pre class="highlight">
function throwException() {
    throw new Exception('Exception message goes here');

$server = new Zend_Soap_Server(NULL, array('location' => '<a href=""></a>', 'uri' => '<a href=""></a>'));

$client = new Zend_Soap_Client_Local($server, NULL, array('location' => '<a href=""></a>', 'uri' => '<a href=""></a>'));

try {
    echo ' We got past $client->throwException()';
catch (SoapFault $f) {
    echo 'We caught a SoapFault!';

h4. Expected result "We caught a SoapFault!'

h4. Actual result

<pre class="literal">
<?xml version="1.0" encoding="UTF-8"?>">Receiver
    Exception message goes here


Posted by Amr Mostafa (alienbrain) on 2009-09-09T05:58:01.000+0000

I've traced this down to the following lines in Zend_Soap_Server::handle():

<pre class="highlight">
try {
} catch (Exception $e) {
    $fault = $this->fault($e);
    $soap->fault($fault->faultcode, $fault->faultstring);

The problem is that $soap->fault() (i.e. PHP's SoapServer::fault()) terminates execution. I've submitted a PHP bug report:

Posted by Rob Allen (rob) on 2012-11-20T20:53:20.000+0000

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.