Edit report at https://bugs.php.net/bug.php?id=48216&edit=1
ID: 48216 Comment by: emuns at quotify dot com Reported by: mark at everytruckjob dot com Summary: PHP Fatal error: SOAP-ERROR: Parsing WSDL: Extra content at the end of the doc Status: Open Type: Bug Package: SOAP related Operating System: CentOs 5.3 PHP Version: 5.3.0RC2 Block user comment: N Private report: N New Comment: This is happening on PHP 5.3.2 on Ubuntu :( Confirmed working on 5.2.17 Previous Comments: ------------------------------------------------------------------------ [2011-09-22 02:47:23] kotekp at gmail dot com seems like: * php 5.3.5 windows has same bug * php 5.3.8 linux works fine ------------------------------------------------------------------------ [2011-07-12 08:41:12] tej dot nri at gmail dot com I believe that this problem is only happening in php 5.3.* as it was working in php 5.2.* The solution is also not very difficult. Steps: 1. Download the WSDL file by $ wget http://example.com/path/to/wsdl/file.xml 2. Put this wsdl file at some location. Let's say the path is /local/path/to/wsdl/file.xml 3. Now create the soap client by the locally saved file like below ------------------------------------------------------------------------------ $soapClient = new SoapClient('/local/path/to/wsdl/file.xml', array('features' => SOAP_USE_XSI_ARRAY_TYPE, 'trace' => 1, 'exceptions' => true)); $result = $soapClient->__soapCall('ServiceName', $data); ------------------------------------------------------------------------------ I believe this will work. ------------------------------------------------------------------------ [2011-01-26 17:16:12] g at miernicki dot com It appears this problem is not fixed on 5.3.4 or 5.3.5! I've instantiated a brand new (out of the box) nuSoap 0.9.5 server, defined a single service, and still receive the same error on both >> Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL:Couldn't load from 'http://server/index.php?wsdl' : Extra content at the end of the document in /home/user/consume.php:7 Stack trace: #0 /home/user/consume.php(7): SoapClient->SoapClient('http://server...') #1 {main} thrown in /home/user/consume.php on line 7 ------------------------------------------------------------------------ [2010-10-01 01:35:05] pguy at vrcis dot com Experiencing the same behavior going against a web service hosted on an Oracle 10g Application Server. It's using chunked transfer encoding. my PHP setup: Downloaded php-5.3.3-nts-Win32-VC9-x86.zip today to my Windows 7 64-bit PC, renamed php.ini-development to php.ini, uncommented extension_dir, extension=php_soap.dll, and soap.wsdl_cache_dir. Ran php from the command line using a php file containing the script with the SoapClient. Request headers: GET /path/endpoint?WSDL HTTP/1.1 Host: oas.internal.local:80 Authorization: Basic dGVzdDp0ZXN0 Connection: close Response headers: HTTP/1.1 200 OK Date: Thu, 30 Sep 2010 22:45:45 GMT Server: Oracle-Application-Server-10g/10.1.2.0.2 Oracle-HTTP-Server Cache-Control: private Connection: close Transfer-Encoding: chunked Content-Type: text/xml; charset=UTF-8 The body is broken into several chunks, all of which appear to have the correct sizes. Interestingly, I tried one of the wsdl urls posted in an earlier comment - http://webapi.allegro.pl/uploader.php?wsdl - and it worked fine. I noticed that its body was just one chunk. As others have noted, the wsdl that 5.3.3 is rejecting works just fine in 5.2.x. -Peter ------------------------------------------------------------------------ [2010-09-22 05:36:08] tonybrown at cox dot net I downloaded the latest 5.3.3, running on Fedora 13, ran into this problem, is there a good solution? I may need to fall back to 5.2.something because we require WSDL. If I can't parse a WSDL file, I'm screwed, because the ICD prescribes it. I did get non-WSDL to work, but I'm not yet sure if that will be acceptable. I can get the same high level functionality, but then I won't be ICD-compliant. I am also worried that if I fall back to 5.2.something I will then run into other bugs that 5.3.3 might have fixed. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=48216 -- Edit this bug report at https://bugs.php.net/bug.php?id=48216&edit=1