我試圖連接PHP中的Nav Web服務(接着是Blog)。在php中連接Nav Web服務
但它返回一個錯誤:
SOAP-ERROR: Parsing WSDL: Couldn't load from ' http://NavIP.com:7047/DynamicsNAV/WS/SystemService ' : Start tag expected, '<' not found.
你能告訴我在哪裏出了錯?
在此先感謝..
我的代碼是:
//client.php
<?php
require_once("NTLMStream.php");
require_once("NTLMSoapClient.php");
try
{
// we unregister the current HTTP wrapper
stream_wrapper_unregister('http');
// we register the new HTTP wrapper
stream_wrapper_register('http', 'NTLMStream') or die("Failed to register protocol");
// Initialize Soap Client
$baseURL = 'http://NavIp.Com:7047/DynamicsNAVPMS/WS/';
$client = new NTLMSoapClient($baseURL.'SystemService');
// Find the first Company in the Companies
$result = $client->Companies();
$companies = $result->return_value;
echo "Companies:<br>";
if (is_array($companies)) {
foreach($companies as $company) {
echo "$company<br>";
}
$cur = $companies[0];
}
else {
echo "$companies<br>";
$cur = $companies;
}
}
catch(Exception $ex)
{
echo $ex->getMessage();
}
?>
嗨伯恩哈德,我給錯域名的Y它沒有返回結果,現在工作的罰款。其實我已經在30日晚解決了這個問題,但Iam沒有在這裏更新解決方案。任何方式感謝給予迴應。 –
謝謝Bernhard。 –