|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-06-13 15:07 UTC] cmb@php.net
-Summary: soapclien no process response with Transfer-Enconding
chunked
+Summary: soapclient doesn't process response with
Transfer-Enconding chunked
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 19:00:01 2025 UTC |
Description: ------------ SoapClient return the message error "[HTTP] Error Fetching http body, No Content-Length, connection closed or chunked" when there is a response with Transfer-Encoding chunked. The web service test with sopaUI and the header response (I can“t captured with __getLastResponseHeaders()) is: X-AspNet-Version 2.0.527 Transfer-Enconding chunked #status# HTTP 1.1 200 OK Via 1.1 Nereo (Vordel) Connection keep-alive Content-Typext/xml; charset=utf-8 Server Microsoft IIS/6.0 X-Powered-By Asp.Net Cache-Control private, max-age=0 This problem was resolved (supposedly) in 5.3.0 but is still in 5.3.6. The temporary solution is to use NuSoap library as client. Test script: --------------- <?php $Client = new SoapClient('any.wsdl',array('cache_wsdl'=>WSDL_CACHE_NONE,'trace' => 1,'exceptions' => 1)); $response = $Client->__soapCall('anyFunction', array($request)); ?> Actual result: -------------- Fatal error: Uncaught SoapFault exception: [HTTP] Error Fetching http body, No Content-Length, connection closed or chunked data in /usr/local/apache2/htdocs/lab/cliente.php:41 Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'http://ws.fonas...', 'http://WSFonasa...', 1, 0) #1 /usr/local/apache2/htdocs/lab/cliente.php(41): SoapClient->__soapCall('CertifTrabajado...', Array) #2 {main} thrown in /usr/local/apache2/htdocs/lab/cliente.php on line 41