ali_kiyani Posted February 6, 2009 Share Posted February 6, 2009 Hi, I created the following server: function test($id) { if($id == "1") return "OK"; else return "Bye"; } ini_set("soap.wsdl_cache_enabled", "0"); $server = new SoapServer("testserver.wsdl"); $server->addFunction('test'); $server->handle(); And my client is: ini_set("soap.wsdl_cache_enabled", "0″); $client = new SoapClient("http://localhost/soap/testserver.wsdl"); $id = $client->test("1"); print $id; I am using XAMPP and phpinfo() shows that I have both SOAP client and server enabled. Anyway I tried to run the client in browser as follows: http://localhost/soap/soapclient.php But getting following error: Warning: SoapClient::SoapClient(http://localhost/soap/testserver.wsdl) [soapclient.soapclient]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in Do I need to register the server???? I thought I need to so I wrote this in browser: http://localhost/soap/soapserver.php But got error: WSDLSOAP-ERROR: Parsing WSDL: Couldn't load from 'testserver.wsdl' I am on Windows XP Pro by the way. HELP!! Quote Link to comment Share on other sites More sharing options...
ali_kiyani Posted February 6, 2009 Author Share Posted February 6, 2009 Anyone?? Quote Link to comment Share on other sites More sharing options...
only one Posted February 6, 2009 Share Posted February 6, 2009 It can't find what you are trying to include. try putting in your root path.. /www/soap/testserver.wsdl instead of http://localhost/..... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.