OK, I'm using PHP code to access CA Service Desk (CASD), via its Web Services interface. It requires a secure connection using SSL, and beyond that internal authentication. I have the URL to the WSDL, and can connect to CASD using an open non-SSL connection on a development server. However, I can't get the SSL connection to work right. I get a client object, but none of the CA methods work. Can anyone help?
Code: Select all
// Here is some code.
$CASDURL = 'https://{secureserver.com}:8443/axis/services/USD_R11_WebService?wsdl';
// We are using self-signed certificates (whatever that is), so:
$context = stream_context_create(
array(
'SSL' => array(
'allow_self_signed' => TRUE
)
)
);
// Now I create the client:
$client = @new SoapClient(
($CASDURL,
array(
"exceptions" => 1,
"stream_context" => $context
)
);
// Now I need to log into the CASD to start a session:
$sid = $client->login(array('username' => 'myuserid', 'password' => 'mypassword'));
// This line fails, saying it cannot connect to the host.
Thanks.