From:             ilya at iponweb dot net
Operating system: Debian Linux (testing)
PHP version:      5CVS-2006-03-06 (snap)
PHP Bug Type:     SOAP related
Bug description:  SoapServer::handle() exits on SOAP faults

Description:
------------
When calling SoapServer::handle() it exits after processing the SOAP
request if request handler returns a SoapFault object. It makes impossible
to do any work on the SOAP server side after processing requests if they
result in SoapFault.

I belive exactly the same issue was reported in bug report #31993 but for
some reason it was closed without actually fixing the problem in the soap
extension. I could reproduce the problem with PHP 5.1.1 and with PHP
snapshot 5.1-200603061130.

The test code demostrates this problem. It is a simple soap server with
two remotly callable functions: test1 and test2. The first of them simply
returns a string, the second returns a soap fault object. The server is
supposed to write a string to a log file after processing a request. If
you call remotly test1 function then you can see the string in the log, if
you call remotly test2 function then the log file is empty.

Reproduce code:
---------------
<?php

$server = new SoapServer(null, array('uri' => "http://test-uri/";));

$h = fopen("/tmp/soap.log", "w");

$server->addFunction(array('test1', 'test2'));
$server->handle();

fputs($h, 'TEST');
fclose($h);

function test1() {
        return "test1";
}

function test2() {
        return new SoapFault("test2", "test2");
}

?>

Expected result:
----------------
A log message in file /tmp/soap.log

Actual result:
--------------
Nothing when calling remotly 'test2' function.

-- 
Edit bug report at http://bugs.php.net/?id=36629&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=36629&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=36629&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=36629&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=36629&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=36629&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=36629&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=36629&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=36629&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=36629&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=36629&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=36629&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=36629&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=36629&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=36629&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=36629&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=36629&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=36629&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=36629&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=36629&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=36629&r=mysqlcfg

Reply via email to