PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Web Services » SOAP » Bug #6704

function call in SOAP Header stops Processing

Details

Submitted2006-02-06 11:20 UTC
Fromprogrammieren at compusmile dot net
Assignedyunosh
StatusClosed
PackageSOAP
PHP Version5.0.3
OSDebian Sarge testing
Roadmaps(Not assigned)

Comments

[2006-02-06 11:20 UTC] programmieren at compusmile dot net

Description:
------------
If you have a method call in a SOAP-Header (e.g. for Session Management), the processing of the request is stopped and a HTTP 200 OK Response with no content is returned.

The problem is related to PHP5's passing of arguments and references. A temporary variable needs to be used because PHP5 is incapable of passing anonymous variables by reference.

Test script:
---------------
reproduce BUG:
$soapProxy->addHeader(new SOAP_Header('{urn:example}checkSession','string',$strSessionID,1,'http://schemas.xmlsoap.org/soap/actor/next'));
$result = $soapProxy->foo();

FIX: in Server.php change line 401 from:

$header_results[] = array_shift($this->buildResult($hr, $this->return_type, $header_method, $header_val->namespace));

to

$tmp = $this->buildResult($hr, $this->return_type, $header_method, $header_val->namespace);
$header_results[] = array_shift($tmp);

Actual result:
--------------
HTTP/1.0 200 OK
Date: Mon, 06 Feb 2006 11:15:29 GMT
Server: Apache
Connection: close
Content-Type: text/html