When trying to get the FEDEX rate using a SOAP request (I'm using PHP with XAMPP), I'm getting the following error:
Fault
Code:HTTP String:Could not connect to host
in this code:
<?php
require_once('library/fedex-common.php');
$path_to_wsdl = "wsdl/RateService_v13.wsdl";
ini_set("soap.wsdl_cache_enabled", "0");
$client = new SoapClient($path_to_wsdl, array('trace' => 1));
try {
if(setEndpoint('changeEndpoint')) {
$newLocation = $client->__setLocation(setEndpoint('endpoint'));
}
$response = $client ->getRates($request);
} catch (SoapFault $exception) {
printFault($exception, $client);
}
?>
This happens on Ubuntu only. The same code (also using XAMPP) works fine on Windows, however.