Php에서 Nav 웹 서비스를 연결하려고합니다 (이 블로그 다음에 이어짐 ).
하지만 오류를 반환합니다.
SOAP-ERROR : WSDL 구문 분석 : ' http://NavIP.com:7047/DynamicsNAV/WS/SystemService ' 에서로드 할 수 없습니다 . 시작 태그가 필요합니다. '<'를 찾을 수 없습니다.
내가 어디에서 잘못되었는지 말해 줄 수 있습니까?
미리 감사드립니다 ..
내 코드는 다음과 같습니다.
//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();
}
?>
나는 똑같은 문제를 다루고 있지만 모두이 동일한 스크립트로 돌아 오기 때문에 해결책을 찾지 못했습니다. 귀하의 문제는 401 오류 코드 (인증 할 수 없음)로 인해 결과가 반환되지 않는다는 것입니다. 스크립트는 연결에 CURL을 사용하지만 어떻게 든 실패합니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다