Jump to content


This topic is now archived and is closed to further replies.


PHP SoapClient and SoapServer problem

Recommended Posts


I'm pretty experienced with PHP but this really bites me. I've created a SoapServer with PHP5's builtin SOAP extension. Unfortunatley I cannot seem to talk with it using PHP's SoapClient. I keep getting a "Error Fetching http headers" error (indicating the WebService does not respond).

On my development environment (laptop running PHP 5.1.2 on windows/ apache 2.0) I have no problems when running and connecting with the webservice (locally).

But when I put the WebService online (on a webserver) it fails.

However, only when I use PHP (SoapClient). When I'm connecting to the remote WebService using ASP.NET it does work! (http://www.soapclient.com/soapclient?template=%2Fclientform.html&fn=soapform&SoapTemplate=%2FSoapResult.html&SoapWSDL=http://www.zoekned.nl/test/test.wsdl)

The webserver runs Linux with Apache 1.3 and PHP 5.1.2

I've also tried to connect with a PHP SoapClient running on my laptop to the remote SoapServer running on the webserver (also error).

During the test sessions I've turned on logging to see if the Remote WebService receives a hit . The log file is blank when I use the PHP SoapClient (explaining the error fetching HTTP Headers).

These are the locations of the files and the source code:

[a href=\"http://www.zoekned.nl/test/client.php\" target=\"_blank\"]http://www.zoekned.nl/test/client.php[/a] (SoapClient)

ini_set("soap.wsdl_cache_enabled", "0");
$client = new SoapClient("http://www.zoekned.nl/test/test.wsdl");

server.php -> [a href=\"http://www.zoekned.nl/test/server.php\" target=\"_blank\"]http://www.zoekned.nl/test/server.php[/a] (WebService)

ini_set("soap.wsdl_cache_enabled", "0");

* @param string $what
* @return string
function searchCompanies($what){
    $result = "Results!!!";
    return $result;

$server = new SoapServer("test.wsdl");

The WSDL file is found here: [a href=\"http://www.zoekned.nl/test/test.wsdl\" target=\"_blank\"]http://www.zoekned.nl/test/test.wsdl[/a]

Has anyone else experienced this, or could someone tell me if they can connect to my SOAPServer using PHP 5's SoapClient?

It must be something with the SoapClient since ASP.NET can connect with it.....

Any help is appriciated...



Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.