I am trying to connect to a HTTPS location
. Currently I get Could not connect to host
error. I am testing on two Ubuntu servers. This error occurs on one Ubuntu server which is off site. The other server which is on a development server on site works fine. I searched the server files and have yet to find any differences in the systems that would cause this kind of issue. I have yet to find someone with a similar issue and tried many different solutions related to the same error message (e.g. disabling wsdl caching, etc...).
- HTTP works fine on both servers
- HTTPS works on one server
- php.ini files are the same
- OpenSSL and Soap shows enabled in
phpinfo();
(HTTP works, so I assume Soap is fine) -
wget https://exampleurl.com/services/SessionService
works fine on the server getting the error
What should I look at next?
What testing can I do?
How can I get addition info about the error?
$sessionService = new SessionService('/path/to/local/file/SessionService.wsdl', array(
'location' => "https://exampleurl.com/services/SessionService"
));
try {
// throws SoapFault error
$token = @Login($sessionService, $username, $password);
}
catch (SoapFault $sf) {
//echo $sf->getMessage());
//echo $sf;
}
SessionService class:
class SessionService extends SoapClient {
private static $classmap = array(
'login' => 'login',
'loginResponse' => 'loginResponse',
...
);
public function SessionService($wsdl = "http://localhost:8080/services/SessionService?wsdl", $options = array()) {
foreach (self::$classmap as $key => $value) {
if (!isset($options['classmap'][$key])) {
$options['classmap'][$key] = $value;
}
}
parent::__construct($wsdl, $options);
}
//fails here
public function login(login $parameters) {
return $this->__soapCall('login', array($parameters), array(
'uri' => 'http://example.url.com',
'soapaction' => ''
)
);
}
//... other functions
}