ID:               48216
 Comment by:       boris dot t at usask dot ca
 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:

it seems that X-Powered-By: is causing problems. 
The same problem exists when 

HTTP/1.x 200 OK
Date: Fri, 18 Sep 2009 16:24:06 GMT
X-Powered-By: Servlet 2.4; JBoss-4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA
date=200807181417)/JBossWeb-2.0
Content-Type: text/xml;charset=utf-8
Connection: close
Transfer-Encoding: chunked
 
and the same code works when 

HTTP/1.x 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=utf-8
Transfer-Encoding: chunked
Date: Fri, 18 Sep 2009 16:23:28 GMT


Previous Comments:
------------------------------------------------------------------------

[2009-09-07 20:04:53] sjo...@php.net

Thank you for your feedback.

It would be most helpful to us if you could supply us with the HTTP
transaction of the retrieval of the WSDL. You may use a sniffer like
Wireshark to obtain this information, or use this script I wrote
<http://www.gissen.nl/files/sniff.php>.

------------------------------------------------------------------------

[2009-09-07 00:43:35] michael dot tibben at gmail dot com

We are experiencing a similar issue. However, the HTTP reply is using
chunked transfer encoding (Content-Length is NOT required when using
chunked)


HTTP/1.1 200 OK
Date: Sun, 06 Sep 2009 23:25:16 GMT
Server: Apache
X-Powered-By: Servlet/2.4 JSP/2.0
Transfer-Encoding: chunked
Content-Type: text/xml; charset=UTF-8

------------------------------------------------------------------------

[2009-06-24 10:23:47] sjoerd-php at linuxonly dot nl

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"?>...

------------------------------------------------------------------------

[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

Reply via email to