Edit report at https://bugs.php.net/bug.php?id=37054&edit=1

 ID:                 37054
 Comment by:         dgl dot marimuthu at gmail dot com
 Reported by:        gijs at d1 dot nl
 Summary:            SoapClient Error Fetching http headers
 Status:             Closed
 Type:               Bug
 Package:            SOAP related
 Operating System:   Debian 3.1
 PHP Version:        5.1.3RC3
 Assigned To:        dmitry
 Block user comment: N
 Private report:     N

 New Comment:

Fatal error: Uncaught SoapFault exception: [Client] DTD are not supported by 
SOAP 
in C:\xampp\htdocs\web services\soap_client.php:4 Stack trace: #0 
C:\xampp\htdocs\web services\soap_client.php(4): SoapClient-
>__call('getCatalogEntry', Array) #1 C:\xampp\htdocs\web 
services\soap_client.php(4): SoapClient->getCatalogEntry('catalog2') #2 {main} 
thrown in C:\xampp\htdocs\web services\soap_client.php on line 4


Previous Comments:
------------------------------------------------------------------------
[2006-04-13 08:55:16] gijs at d1 dot nl

Thank you for your quick response! Changing the "user agent" worked like you 
said! Server settings should be changed about now. Problem apears to be a 
Apache setting that prevents Web Crawlers, E-mail harvesters etc. Somehow PHP 
got filterd out as well.

Cheers! 

Gijs van de Nieuwegiessen 

ps.I'll keep the .php files in the zoekned.nl/test directory up for historical 
reasons. Thanks a lot for your help!

------------------------------------------------------------------------
[2006-04-13 08:21:00] dmi...@php.net

At first you have typo in WSDL.
"http://www.zoekned.nl/test/server.php:80"; is not a valid URL. But this is not 
important.

The bug occurs because of your HTTP server configuration.
For some reason it respond with the following response and SoapClient redirects 
to "http://www.sukkel.nl";.

HTTP/1.1 302 Found
Date: Thu, 13 Apr 2006 06:54:04 GMT
Server: Apache/1.3.34 (Unix) PHP/5.1.3RC3 mod_ssl/2.8.25 OpenSSL/0.9.7e 
FrontPage/5.0.2.2510
Location: http://www.sukkel.nl
Keep-Alive: timeout=5, max=499
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>302 Found</TITLE>
</HEAD><BODY>
<H1>Found</H1>
The document has moved <A HREF="http://www.sukkel.nl";>here</A>.<P>
<HR>
<ADDRESS>Apache/1.3.34 Server at www.zoekned.nl Port 80</ADDRESS>
</BODY></HTML>

Seems this answer occurs because of "User-Agent" reqest header. I changed 
default header "PHP-SOAP/php-version" to conform HTTP RFC, but this didn't 
help. (BTW SOAP/php-version works fine). Probably your web server configured to 
respond with this magic answer to requests from PHP. :)

To make workaround for such servers, I added ability to change "User-Agent" 
HTTP header in HTTP response.
You can do it in SoapClinet constructor:

new SoapClient($wsdl, array("user_agent"=>"some_string"));

empty string ("") will prevent sending of User-Agent server at all.

Fixed in CVS HEAD and PHP_5_0.

------------------------------------------------------------------------
[2006-04-12 17:01:38] sni...@php.net

Assigned to the SOAP maintainer.

------------------------------------------------------------------------
[2006-04-12 15:06:13] gijs at d1 dot nl

Sorry, no, it does not run on the latest snapshot.

- Client
http://www.zoekned.nl/test/client.php

- Client Source:
http://www.zoekned.nl/test/client.phps


- Server
http://www.zoekned.nl/test/server.php

- Server Source:
http://www.zoekned.nl/test/server.phps

------------------------------------------------------------------------
[2006-04-12 15:02:27] sni...@php.net

Nice, but does the SOAP thing work now?

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


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=37054


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=37054&edit=1

Reply via email to