SOAP Error: Could not connect to host
Hi, I want to use the API of ISPConfig 3.0.4.6 and therefore I have made a test script (using example), simply to connect to the SOAP server.
It runs on a Ubuntu 12.04.2 LTS precise server.
I have to mention that I had for about 4 months ago a working script, but now, after I have upgraded the server, it no longer works.
The script is very common:
$username = 'remoteusr';
$password = 'password';
$soap_location = 'https://myserverip:8080/remote/index.php';
$soap_uri = 'https://myserverip:8080/remote/';
$client = new SoapClient(null, array('location' => $soap_location,
'uri' => $soap_uri,
'trace' => 1));
// ini_set('soap.wsdl_cache_enabled',0);
// ini_set('soap.wsdl_cache_ttl',0);
try {
//* Login to the remote server
if($session_id = $client->login(trim($username),trim($password))) {
echo 'Logged into remote server sucessfully. The SessionID is '.$session_id.' - <br>';
}
//* Logout
if($client->logout($session_id)) {
echo "Logout for session ".$session_id;
}
} catch (SoapFault $e) {
var_dump($client->__getLastRequest())."<br>";
var_dump($client->__getLastResponse())."<br>";
echo "<br>Please contact the server administator<br>";
die('SOAP Error: '.$e->getMessage());
}
The getLastRequest gives me the username and password back
The getLastResponse gives me NULL
I don't get what is wrong here, especially where it did work before!!
|
Recent comments
7 hours 50 min ago
12 hours 55 min ago
17 hours 19 min ago
19 hours 8 min ago
1 day 9 hours ago
1 day 9 hours ago
1 day 14 hours ago
1 day 21 hours ago
1 day 21 hours ago
1 day 23 hours ago