|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36083 SoapClient waits for responses on one-way operations
Submitted: 2006-01-19 12:57 UTC Modified: 2006-02-07 13:49 UTC
From: bugs dot php at inspirationlabs dot net Assigned: dmitry
Status: Closed Package: SOAP related
PHP Version: 5.1.2 OS: WinXP SP2, Apache/2.0.54 (Win32)
Private report: No CVE-ID:
 [2006-01-19 12:57 UTC] bugs dot php at inspirationlabs dot net
Try to call SoapService in one-way operation.
Client waits until SoapServer answeres. I think the SoapServer has to return HTTP "202 Accepted" response (see Bug #32776), that is right, but the response must been send before the Server executed SoapServer->handle().

Reproduce code:
	$starttime = microtime(true);
	$client = new SoapClient("oneway.wsdl",	array(	'trace' => 1));
	echo "UsedTime: ".(microtime(true) - $starttime);

	function foo($input) {
	$Server = new SoapServer("oneway.wsdl");

WSDL (part):
	<portType name="serverPortType">
		<operation name="foo">
			<input message="typens:foo"/>
	<binding name="serverBinding" type="typens:serverPortType">
		<soap:binding style="rpc" transport=""/>
		<operation name="foo">
			<soap:operation soapAction="urn:serverAction"/>
				<soap:body namespace="urn:oneway.wsdl" use="literal"/>

Expected result:
Server must answer under 1 Second, so Client Output Result is like:

UsedTime: 0.0034999847412

Actual result:
Server answers after sleep(7), Client waits until Server sending all Headers. So Client Output Result is like:

UsedTime: 7.0034999847412 !!!


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-19 13:30 UTC]
Assigned to the maintainer.
 [2006-02-07 13:49 UTC]
Fixed in CVS HEAD and PHP_5_1.

Now SoapClient doesn't wait for one-way operations by default, but it is possible to use old behavior:

$soap = new SoapClient($wsdl, array("features"=>SOAP_WAIT_ONE_WAY_CALLS));
PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Sun Oct 04 21:01:30 2015 UTC