0
我正在嘗試編寫一個PHP腳本,它將連接到我們的SightMax接口的SOAP客戶端。隨着下面的代碼,我收到以下錯誤。致命錯誤:未捕獲SoapFault異常:[HTTP]錯誤請求
<?php
$client = new SoapClient('http://domain.com/SightMaxWebServices/SightMaxWebService.svc?wsdl', array("soap_version" => SOAP_1_2));
$result = $client->__soapCall("GetSiteSummary", array(), array(), new soapHeader('action','SmartMax.SightMax.Agent.Operator/IRemotedWebsiteAdministrator/CreateCallQueue'));
echo "<pre>";
print_r($result);
echo "</pre>";
?>
。
Fatal error: Uncaught SoapFault exception: [HTTP] Bad Request in test2.php:5 Stack trace: #0 [internal function]: SoapClient->__doRequest('__soapCall('GetSiteSummary', Array, Array, Object(SoapHeader)) #2 {main} thrown in test2.php on line 5
這是PHP Fatal error: "The SOAP action specified on the message, '', does not match the HTTP SOAP Action"我在那裏不指定SOAP動作報頭中的持續。我相信我現在正在指定標題,但唉一個新的錯誤。