|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-04-12 12:51 UTC] 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 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 05:00:01 2025 UTC |
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