PEAR SOAP and SSL Problem

This is a discussion on PEAR SOAP and SSL Problem within the PHP General forums, part of the PHP Programming Forums category; Greetings, I am trying to attach to a .NET Web Service via SSL. I can and parse to non-SSL ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-18-2004
Richard Rosa
 
Posts: n/a
Default PEAR SOAP and SSL Problem

Greetings,

I am trying to attach to a .NET Web Service via SSL. I can and parse to
non-SSL services without incident. I've read every bit of documentation
that I can find the last few days, where everyone says its possible.

My problem is that CURL connection, but it drops an empty request, so
the WS fails, as its looking for an XML payload that never comes.

The code that I'm using:

//--------------------------------------------------------------------

require_once "SOAP/Client.php";

$ClientCode = "ClientCode";
$UserID = "UserID";
$UserPassword = "password";

$params = array('ClientCode'=>$ClientCode,
'UserID'=>$UserID,
'UserPassword'=>$UserPassword);

$client = new SOAP_Client(
"https://secure.someservice.net/Service/Service.asmx"
);

// CURL options to bypass SSL certificate checking
$client->setOpt('curl', CURLOPT_VERBOSE, 1);
$client->setOpt('curl', CURLOPT_SSL_VERIFYPEER, 0);
$client->setOpt('curl', CURLOPT_SSL_VERIFYHOST, 0);

$response = $client->call('SystemValidate',$params, array(
'style' => 'literal',
'namespace'=> 'urn:SystemValidate',
'soapaction' =>
'https://secure.someservice.net/Service/SystemValidate',
'use' => 'literal',
'trace'=>'1'));

if (strtolower(get_class($response)) == "soap_fault") {
print "Error! " . $response->message;
} else {
print "{". print_r($response) ."}";
}
print "<hr />Debug<pre>";

// show me the Request Payload
print "<p>REQ:<br>";
print nl2br(htmlspecialchars($client->__getlastrequest()));
print "</pre>";
print "<hr /><pre>";

// show me the response
print "<p>RES:<br>";
print nl2br(htmlspecialchars($client->__getlastresponse()));
print "</pre>";


//--------------------------------------------------------------------------------

In the end I get an empty request payload. I read everything about SSL
certificate checking, and placed the right code to bypass that. I'm
stumped, so any help will be appreciated.

Regards,
Richard Rosa


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:46 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0