I am trying to call a method with php SOAPclient from a web service but get the following error:
PHP Fatal error: Uncaught SoapFault exception: [HTTP] Forbidden ( The page must be viewed over a secure channel (Secure Sockets Layer (SSL)). Contact the server administrator. )
Stack trace:
#0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'http://www.ebri...', 'eBridge.WebServ...', 1, 0)
#1 /var/application/test-control4-xml.php(284): SoapClient->__call('GetDocumentList', Array)
#2 /var/application/test-control4-xml.php(284): SoapClient->GetDocumentList(Array)
#3 {main}
Here is the code I am using:
$client = new SoapClient("https://www.ebridgeservices.com/ePortalService.asmx?WSDL");
$params=
array( 'login' => $user,
'password' => $password,
'status'=>'All',
'docType'=>'850',
'fromDate'=> $from_date,
'toDate'=> $to_date,
'partner'=>'OurPartner') ;
$results = $client->GetDocumentList($params);
var_dump($results->GetDocumentListResponse);
As you can see I am using an https address, so I am not sure why I am getting this error. Am I doing something wrong?
A common cause of this error is when your version of php is compiled without the openssl library. Simply put your php is unable to make requests over https connection.
Check your phpinfo() output and see of you have openssl or any type of SSL support.
Feeding that WSDL to http://soapclient.com/soaptest.html shows that the links in that WSDL file point to http:// URLs on their server, not https:// . Might want to ask their support about that.