Я пытаюсь подключить AFAS для получения данных
$soapURL = "https://80051.afasonlineconnector.nl/profitservices/appconnectorget.asmx?wsdl" ;
$soapFunction = "GetData" ;
$soapFunctionParameters = array(
'token' =>'mytokenhere',
'connectorId'=>'myconnectud',
'filtersXml' => 'urn:Afas:Profit:Services',
'skip' => 0,
'take' => 200) ;
$soapClient = new SoapClient($soapURL);
$soapResult = $soapClient->__soapCall($soapFunction,$soapFunctionParameters) ;
выше дает ошибку плода
Fatal error: Uncaught SoapFault exception: [soap:Server] Er is een onverwachte fout opgetreden. in xxxxx/afasscript/index.php:38 Stack trace: #0 xxxxxx/afasscript/index.php(38): SoapClient->__soapCall('GetData', Array) #1 {main} thrown inxxxxxx/afasscript/index.php on line 38`
Я пытался использовать попытку и поймать, но не вижу фактическую ошибку. Функции и параметры как показано ниже
array(4) {
[0]=>
string(44) "GetDataResponse GetData(GetData $parameters)"
[1]=>
string(77) "GetDataWithOptionsResponse GetDataWithOptions(GetDataWithOptions $parameters)"
[2]=>
string(44) "GetDataResponse GetData(GetData $parameters)"
[3]=>
string(77) "GetDataWithOptionsResponse GetDataWithOptions(GetDataWithOptions $parameters)"
}
array(4) {
[0]=>
string(96) "struct GetData {
string token;
string connectorId;
string filtersXml;
int skip;
int take;
}"
[1]=>
string(49) "struct GetDataResponse {
string GetDataResult;
}"
[2]=>
string(124) "struct GetDataWithOptions {
string token;
string connectorId;
string filtersXml;
int skip;
int take;
string options;
}"
[3]=>
string(71) "struct GetDataWithOptionsResponse {
string GetDataWithOptionsResult;
}"
}
array(4) {
[0]=>
string(44) "GetDataResponse GetData(GetData $parameters)"
[1]=>
string(77) "GetDataWithOptionsResponse GetDataWithOptions(GetDataWithOptions $parameters)"
[2]=>
string(44) "GetDataResponse GetData(GetData $parameters)"
[3]=>
string(77) "GetDataWithOptionsResponse GetDataWithOptions(GetDataWithOptions $parameters)"
}
array(4) {
[0]=>
string(96) "struct GetData {
string token;
string connectorId;
string filtersXml;
int skip;
int take;
}"
[1]=>
string(49) "struct GetDataResponse {
string GetDataResult;
}"
[2]=>
string(124) "struct GetDataWithOptions {
string token;
string connectorId;
string filtersXml;
int skip;
int take;
string options;
}"
[3]=>
string(71) "struct GetDataWithOptionsResponse {
string GetDataWithOptionsResult;
}"
}
Сделал ли я что-то не так с вызовом функции GeData, это хорошо работает, когда я использую онлайн-сервисы мыльного вызова, может кто-нибудь помочь мне исправить это, пожалуйста.
Спасибо