2
我想使用PHP的soap客戶端連接到一個web服務,我可以成功地使用Visual Studio,按F5並在本地運行該頁面,以處理工作。使用SOAP和PHP連接到Web服務
只要我上傳完全相同的文件到我的apache web主機,我不斷收到錯誤:「未能加載外部實體」。
這裏是我的代碼與憑據和URL取出...
任何想法?
<?php
header("Access-Control-Allow-Origin: http://example.com");
header("Access-Control-Request-Method: GET,POST");
ini_set('display_errors', true);
ini_set("soap.wsdl_cache_enabled", "0");
error_reporting(E_ALL);
try
{
$soapclient = new SoapClient('http://example.com');
$params = array ('SystemID' => 'testID','Username' => 'test', 'Password' => 'test');
$response = $soapclient->GetEngineerList($params);
print_r($response);
}
catch(SoapFault $e)
{
print_r($e);
}
對不起,那裏是$網址是我剛剛編輯的計算器代碼,並刪除我url ...我會編輯我的代碼來糾正它... –
但是...這需要是一個有效的WSDL網址... $ client = new SoapClient(「some.wsdl」); – WEBjuju
有什麼幫助? http://stackoverflow.com/questions/12875409/soap-php-fault-parsing-wsdl-failed-to-load-external-entity – WEBjuju