PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Tue Dec 01, 2020 5:54 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: PHP/SOAP/SSL/CASD
PostPosted: Tue Aug 23, 2011 7:50 am 
Offline
Forum Newbie

Joined: Tue Aug 09, 2011 9:38 am
Posts: 4
I hate acronyms!!
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?

Syntax: [ Download ] [ Hide ]
// 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.
 

My eternal gratitude to anyone who can help me out.
Thanks.


Top
 Profile  
 
 Post subject: Re: PHP/SOAP/SSL/CASD
PostPosted: Mon Sep 12, 2011 2:08 am 
Offline
Forum Commoner

Joined: Tue Aug 23, 2011 8:23 am
Posts: 39
Location: Oslo, Norway
I see you have the @ error suppression operator in the statement where you create the SoapClient. Perhaps if you remove that, you'll learn something that will help you understand what's going on. Also, I assume that the {secureserver.com} part of the URL is a token for your real server.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group