PHP Webservice in PHP 5 - SOAP-ERROR: Parsing WSDL
Posted: Thu Mar 01, 2007 2:06 am
Hi Folks,
I have developed PHP webservice using NuSOAP and php 5.x and we have also created client scripts to invoke server soap methods. All these are available in the RedHat Linux machine.
Both the server and client scripts are available in the same Linux machine.
If i call the server SOAP method using local ip, it is working fine. But if i call the same with public ip(external ip) i get the following error
Client Script
And the Linux machine is not under any proxy and firewall
Expecting the solution ASAP, coz the situation is so critical.
Thanks in advance
I have developed PHP webservice using NuSOAP and php 5.x and we have also created client scripts to invoke server soap methods. All these are available in the RedHat Linux machine.
Both the server and client scripts are available in the same Linux machine.
If i call the server SOAP method using local ip, it is working fine. But if i call the same with public ip(external ip) i get the following error
Code: Select all
Warning: SoapClient::__construct(http://x.x.x.x/opendoc/soap/ dynserver_4.php?wsdl) [function.--construct]: failed to open stream: HTTP request failed! in /opt/lampp/htdocs/opendoc/soap/dynclient_5.php
on line 8
Warning: SoapClient::__construct() [function.--construct]: I/O warning : failed to load external entity "http://x.x.x.x/opendoc/soap/ dynserver_4.php?wsdl" in /opt/lampp/htdocs/opendoc/soap/ dynclient_5.php on line 8
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://x.x.x.x/opendoc/soap/dynserver_4.php? wsdl' in /opt/lampp/htdocs/opendoc/soap/dynclient_5.php:8 Stack trace: #0 /opt/lampp/htdocs/opendoc/soap/dynclient_5.php(9): SoapClient->__construct('http://x.x.x...', Array) #1 {main} thrown in /opt/lampp/htdocs/opendoc/soap/dynclient_5.php on line 8Client Script
Code: Select all
<?php
$wsdl="http://x.x.x.x/soap/dynserver_4.php?wsdl";
// If i replace the above ip with local ip then it is working fine.
$client = new soapclient($wsdl);
echo $client->Authenticate("Authenticate TEST")."<br>";
echo $client->ClearShop("Clearshop TEST")."<br>";
echo $client->PostData("PostData TEST")."<br>";
echo $client->RetrieveData("RetrieveData TEST")."<br>";
echo $client->SendMail("SendMail TEST")."<br>";
?>Expecting the solution ASAP, coz the situation is so critical.
Thanks in advance