|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-08-04 14:10 UTC] tony2001@php.net
[2006-08-04 19:07 UTC] schack at tdconline dot dk
[2006-08-07 11:44 UTC] dmitry@php.net
[2006-08-08 19:13 UTC] dmitry@php.net
[2010-12-20 14:16 UTC] jani@php.net
-Summary: SOAP call timeout when the response is chunked
+Summary: Call timeout when the response is chunked
-Package: Feature/Change Request
+Package: SOAP related
[2017-10-24 07:52 UTC] kalle@php.net
-Status: Assigned
+Status: Open
-Assigned To: dmitry
+Assigned To:
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 11:00:02 2025 UTC |
Description: ------------ There seems to no way to abort a soap call when the response is chunked and none of the chunks exceed the timeout specified with ini_set('default_socket_timeout', 3). Reproduce code: --------------- ###### File: client.php ini_set('default_socket_timeout', 3); $client = new SoapClient(NULL, array( "location" => "http://foobar.dk/soap/server.php", "uri" => "urn:xmethods-delayed-quotes", "style" => SOAP_RPC, "use" => SOAP_ENCODED, "trace" => 1, "connection_timeout" => 3 ) ); $response = ' [NO RESPONSE] '; try { $response = $client->__call( "getQuote", array(new SoapParam("ibm", "symbol")), array("uri" => "urn:xmethods-delayed-quotes", "soapaction" => "urn:xmethods-delayed-quotes#getQuote") ); } catch(Exception $e) { print "Exception: " . $e->getMessage(); } print $response; ###### File: server.php <?php print '<?xml version="1.0" encoding="UTF-8"?>'; for ($i=0; $i<20; $i++) { print "<!-- $i -->"; flush(); // The client will wait 20 seconds for the response. Without flush the client will drop the request after 3 seconds. sleep(1); } ?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:xmethods-delayed-quotes" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <ns1:getQuoteResponse> <Result xsi:type="xsd:float">198.4234</Result> </ns1:getQuoteResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Expected result: ---------------- The call duration should be about 3 seconds. Actual result: -------------- The actual call duration is 20 seconds.