我正在尝试使用 php SOAPclient 从 Web 服务调用方法,但出现以下错误:
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}
这是我正在使用的代码:
$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);
如您所见,我使用的是 https 地址,所以我不确定为什么会收到此错误。难道我做错了什么?