UPDATE: See Post #3 for what's causing the problem.
I'm trying to debug a SOAP Issue
Server is running on 192.168.1.50
From my desktop I can access my server as soap.myserver.com (works)
I can access & get a wsdl xml file if I go to soap.myserver.com/SOAP/PADL.wsdl (works)
I can use SoapUI 4.0.0 from my desktop and call & execute the functions from the wsdl file correctly.
But now the part that's confusing me.
If I've got a file on that server called SOAP_Client.php @ soap.myserver.com/SOAP/PADL_Client.php Every thing falls apart.
when calling this code
Code:
<?php
try{
$sClient = new SoapClient('http://soap.myserver.com/PADL/PADL.wsdl'); // This Connects to the SOAP Server
$FindID = "12345"; // This is The Shipper ID That We Are Looking For
$AResult= $sClient->GetInfo($FindID ); // This Runs The Command
echo("Value1 ".$AResult->SOID."<br>");
echo("Value2 ".$AResult->CustomerPO."<br>");
echo("Value3 ".$AResult->CustomerSA."<br>");
} catch(SoapFault $e){
var_dump($e);
}
?>
i get this error
Code:
object(SoapFault)#2 (9) { ["message":protected]=> string(156) "SOAP-ERROR: Parsing WSDL: Couldn't load from 'soap.myserver.com/SOAP/PADL.wsdl' : failed to load external entity "soap.myserver.com/SOAP/PADL.wsdl" " ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(54) "/var/www/clients/client1/web5/web/SOAP/PADL_client.php" ["line":protected]=> int(3) ["trace":"Exception":private]=> array(1) { [0]=> array(6) { ["file"]=> string(54) "/var/www/clients/client1/web5/web/SOAP/PADL_client.php" ["line"]=> int(3) ["function"]=> string(10) "SoapClient" ["class"]=> string(10) "SoapClient" ["type"]=> string(2) "->" ["args"]=> array(1) { [0]=> string(36) "soap.myserver.com/SOAP/PADL.wsdl" } } } ["previous":"Exception":private]=> NULL ["faultstring"]=> string(156) "SOAP-ERROR: Parsing WSDL: Couldn't load from 'soap.myserver.com/SOAP/PADL.wsdl' : failed to load external entity "soap.myserver.com/SOAP/PADL.wsdl" " ["faultcode"]=> string(4) "WSDL" }
So after some searching I was reading about PHP Curl issues that might cause this (don't know if true though)
So I created a simple html page 75 bytes in length and a debugging.php page
Code:
<?php
ini_set('display_errors',1);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'http://soap.myserver.com/SOAP/sample.html');
curl_setopt($curl, CURLOPT_VERBOSE, true); // Display communication with server
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); // Return data instead of display to std out
curl_exec($curl);
print_r(curl_getinfo($curl));
curl_error($curl);
curl_close($curl);
?>
when going to soap.myerver.com/SOAP/debugging.php I get the following
Code:
Array ( [url] => http://soap.myserver.com/SOAP/sample.html [content_type] => [http_code] => 0 [header_size] => 0 [request_size] => 0 [filetime] => -1 [ssl_verify_result] => 0 [redirect_count] => 0 [total_time] => 0 [namelookup_time] => 0 [connect_time] => 0 [pretransfer_time] => 0 [size_upload] => 0 [size_download] => 0 [speed_download] => 0 [speed_upload] => 0 [download_content_length] => -1 [upload_content_length] => -1 [starttransfer_time] => 0 [redirect_time] => 0 [certinfo] => Array ( ) )
Second note:
the same SOAP_Client.php , SOAP.wsdl, SOAP_Server.php all work on a different server (one is at home one at work) so I'm thinking it must be in the configuration, but I've no idea what to check now.
Bookmarks