2012-01-24 18 views
0

SightMaxインターフェイスのSOAPクライアントに接続するPHPスクリプトを作成しようとしています。以下のコードでは、私は次のエラーが発生しています。致命的なエラー:Uncaught SoapFault例外:[HTTP] Bad Request

<?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 

これはSOAPアクションヘッダーを指定していないPHP Fatal error: "The SOAP action specified on the message, '', does not match the HTTP SOAP Action"の続きです。私は今、ヘッダーを指定していると思いますが、新しいエラーです。

答えて

0

soapのバージョンを変更しようとすると、$ client-> __ getTypesを試して、あなたのWSを捉えている構造を確認することもできます。

私のリクエストにも同様の問題があります。 how to generate a soap request in php from this xml?

関連する問題