ID: 49226
Comment by: evrard at h2a dot lu
Reported By: richard at rjharrison dot org
Status: No Feedback
Bug Type: SOAP related
Operating System: linux
PHP Version: 5.3.0
New Comment:
For everybody that are looking for a little fix for that, force
SoapClient to send an HTTP 1.0 request and your script may run again. It
is working for me with PHP 5.3.0, ZEND 1.9 (minimal package, via PEAR)
and APACHE 2.2.12 on Windows XP.
<?php
try
{
$context = stream_context_create( array(
'http' => array(
'protocol_version'=> '1.0' ,
'header'=> 'Content-Type: text/xml;' ,
),
) );
$options = array(
'stream_context' => $context ,
);
$client = new SoapClient( 'http://myserver/path?wsdl' , $options
);
}
catch( Exception $e )
{
// You should not be here anymore
}
?>
Previous Comments:
------------------------------------------------------------------------
[2009-09-01 08:07:04] [email protected]
Bug #49397 describes the same problem, but with SoapClient.
------------------------------------------------------------------------
[2009-09-01 01:00:00] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2009-08-24 19:22:37] [email protected]
PHP 5.3 indeed seems to request the WSDL using HTTP/1.1, I was wrong
about that, I'm sorry.
However, it works fine with other WSDLs which are sent chunked. There
seems to be something special about your setup which triggers this bug.
Could you make a dump of the HTTP transaction with a sniffer? Note that
you may have to disable the WSDL caching to force SoapServer to get the
WSDL over HTTP.
------------------------------------------------------------------------
[2009-08-24 17:53:22] richard at rjharrison dot org
Ok I understand your point (that the WSDL server is supposedly at fault
for not providing an HTTP 1.0 response).
I just tested again and watched my Apache access_log. With 5.2.10, the
request is sent from SoapServer using HTTP 1.0, and the response from
the WSDL server correctly includes a content-length header (and
everything works fine).
When I test with 5.3, SoapServer sends the request using HTTP 1.1
(according to the Apache log) and the response is chunk-encoded causing
SoapServer to error.
Therefore I believe that SoapServer in 5.3 is sending an HTTP 1.1
request but is unable to process an HTTP 1.1 response.
------------------------------------------------------------------------
[2009-08-24 16:49:16] [email protected]
The specifications you supply do not describe how to retrieve the
WSDL.
In this case, the WSDL is retrieved using HTTP. I don't think it is
specified which HTTP version to use. The SoapServer class uses HTTP 1.0.
If the server serving the WSDL implements HTTP 1.0, it should send a
content-length header. If it does not implement HTTP 1.0, it should send
a 505 HTTP Version Not Supported.
------------------------------------------------------------------------
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
http://bugs.php.net/49226
--
Edit this bug report at http://bugs.php.net/?id=49226&edit=1