[英]php SOAP not sending certificate.pem
我可以加載wsdl,拉出函數和數據類型就可以了,但是當我嘗試在服務器上調用函數時,出現連接錯誤。 當我查看$ request中傳遞的soap數據時,它不包含任何安全證書,並且不會生成任何錯誤。
我的代碼如下所示:
// setup the transaction array
$header = array('local_cert' => "certificate.pem",
'logonUser' => "user_name",
'style' => SOAP_DOCUMENT,
'use' => SOAP_LITERAL,
'exceptions' => true,
'trace' => true);
// create the soap client, this will log us in
$client = new SoapClient($wsdl, $header);
try
{
$response = $client->getMessage($parameters);
}
catch (Exception $e)
{
dumpVars($client->__getLastRequest());
echo 'Caught exception: ', $e->getMessage(), "\n";
}
?>
所以我的問題是,我該怎么做才能使安全證書通過?
謝謝,
皮特
2(小)件東西:
對於SoapClient構造函數, 'logonUser'似乎不是有效的選項。 如果它是此服務的必需標頭,請考慮使用soapClient :: setSoapHeaders 。 如果它是標准的HTTP登錄參數,請使用“登錄”鍵。
嘗試使用pem證書的完整路徑,並確保php可讀
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.