ID: 48216 Comment by: sjoerd-php at linuxonly dot nl Reported By: mark at everytruckjob dot com Status: Open Bug Type: SOAP related Operating System: CentOs 5.3 PHP Version: 5.3.0RC2 New Comment:
Thank you for your bug report. The WSDL URL you supply does not send a Content-Length or Transfer-Encoding header in some cases, which is mandatory in a response with a body. In other words, it does not follow the HTTP protocol. You should contact the provider of the WSDL about this. GET /url HTTP/1.0 Host: example.com HTTP/1.1 200 OK Date: Wed, 24 Jun 2009 10:18:10 GMT Server: Apache Connection: close Content-Type: text/xml <?xml version="1.0" encoding="UTF-8"?>... Previous Comments: ------------------------------------------------------------------------ [2009-05-09 23:12:48] mark at everytruckjob dot com Description: ------------ Trying to set up a soapClient using the wsdl from the location found in http://www.everytruckjob.com/php53-url.txt (this contains the url and is not the wsdl file itself so I can remove the location once this report is closed as it is not my soap server). Copying the wsdl from the referenced location to my own (http://www.everytruckjob.com/wsdl.php) or saving it to a local file allows parsing to succeed, but while the file sizes seem to be the same, I can't figure out what headers or content causes the "Extra content at the end of the document" error. This works as expected on php 5.2.9 compiled and in use on the same client server with Centos 5.3 libxml2.x86_64 2.6.26-2.1.2.7. Reproduce code: --------------- <?php $wsdl = trim(file_get_contents('http://www.everytruckjob.com/php53-url.txt')); try { $a = new SoapClient($wsdl); } catch (SoapFault $e) { var_dump(libxml_get_last_error()); var_dump($e); } ?> Expected result: ---------------- No SoapFault Actual result: -------------- object(LibXMLError)#1 (6) { ["level"]=> int(3) ["code"]=> int(5) ["column"]=> int(4) ["message"]=> string(41) "Extra content at the end of the document " ["file"]=> string(55) "http://XXXX" ["line"]=> int(488) } object(SoapFault)#2 (9) { ["message":protected]=> string(146) "SOAP-ERROR: Parsing WSDL: Couldn't load from 'XXXXX' : Extra content at the end of the document " ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=48216&edit=1