|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-01-19 12:57 UTC] bugs dot php at inspirationlabs dot net
Description: ------------ 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: --------------- SoapClient: <?php $starttime = microtime(true); $client = new SoapClient("oneway.wsdl", array( 'trace' => 1)); $client->foo("fooInput"); echo "UsedTime: ".(microtime(true) - $starttime); ?> SoapServer: <?php function foo($input) { sleep(7); } $Server = new SoapServer("oneway.wsdl"); $Server->addFunction("foo"); $Server->handle(); ?> WSDL (part): <portType name="serverPortType"> <operation name="foo"> <input message="typens:foo"/> </operation> </portType> <binding name="serverBinding" type="typens:serverPortType"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="foo"> <soap:operation soapAction="urn:serverAction"/> <input> <soap:body namespace="urn:oneway.wsdl" use="literal"/> </input> </operation> </binding> 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 !!! PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 19:00:01 2025 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));