ID: 37054 User updated by: gijs at d1 dot nl Reported By: gijs at d1 dot nl -Status: Feedback +Status: Open Bug Type: SOAP related Operating System: Debian 3.1 PHP Version: 5.1.2RC3 New Comment:
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 Previous Comments: ------------------------------------------------------------------------ [2006-04-12 15:02:27] [EMAIL PROTECTED] Nice, but does the SOAP thing work now? ------------------------------------------------------------------------ [2006-04-12 15:00:31] gijs at d1 dot nl Latest CVS snapshot compiled and running!! http://www.zoekned.nl/phpinfo.php <-- temp file! ------------------------------------------------------------------------ [2006-04-12 12:59:57] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip ------------------------------------------------------------------------ [2006-04-12 12:51:07] gijs at d1 dot nl Description: ------------ 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) 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). It must be something with the SoapClient since ASP.NET can connect with it..... -- SERVER ---- Debian 3.1 Apache 1.3 PHP 5.1.2 ---- PHP Build options ----- ./configure \ --with-apxs \ --with-curl \ --with-curl-dir=/usr/local/lib \ --with-java \ --with-gd \ --with-gd-dir=/usr/local \ --enable-gd-native-ttf \ --with-ttf \ --with-freetype-dir=/usr/local/lib \ --with-gettext \ --with-jpeg-dir=/usr/local/lib \ --with-kerberos \ --with-mcrypt \ --with-mhash \ --with-mysql=/usr/local/mysql \ --with-pear \ --with-png-dir=/usr/local/lib \ --with-libxml-dir=/usr/local/libxml \ --with-xml2-config=/usr/local/bin/xml2-config \ --with-xml \ --with-zlib \ --with-zlib-dir=/usr/local/lib \ --with-zip \ --with-openssl \ --enable-bcmath \ --enable-calendar \ --enable-ftp \ --enable-magic-quotes \ --enable-sockets \ --enable-track-vars \ --enable-mbstring \ --enable-memory-limit \ --enable-soap \ --with-tidy \ --with-xsl \ --with-iconv \ --with-mime-magic Reproduce code: --------------- These are the locations of the files and the source code: http://www.zoekned.nl/test/client.php (SoapClient) CODE <? ini_set("soap.wsdl_cache_enabled", "0"); $client = new SoapClient("http://www.zoekned.nl/test/test.wsdl"); print_r($client->searchCompanies("iets")); ?> server.php -> http://www.zoekned.nl/test/server.php (WebService) CODE <? ini_set("soap.wsdl_cache_enabled", "0"); /*** * @param string $what * @return string */ function searchCompanies($what){ $result = "Results!!!"; return $result; } $server = new SoapServer("test.wsdl"); $server->addFunction("searchCompanies"); $server->handle(); exit(); ?> The WSDL file is found here: http://www.zoekned.nl/test/test.wsdl Expected result: ---------------- <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><searchCompaniesReturn>Results!!!</searchCompaniesReturn></SOAP-ENV:Body></SOAP-ENV:Envelope> Actual result: -------------- Fatal error: Uncaught SoapFault exception: [HTTP] Error Fetching http headers in /home/zoekned/domains/zoekned.nl/public_html/test/client.php:4 Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'http://www.zoek...', 'urn:ServiceActi...', 1) #1 [internal function]: SoapClient->__call('searchCompanies', Array) #2 /home/zoekned/domains/zoekned.nl/public_html/test/client.php(4): SoapClient->searchCompanies('iets') #3 {main} thrown in /home/zoekned/domains/zoekned.nl/public_html/test/client.php on line 4 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37054&edit=1