【发布时间】:2019-01-16 07:46:27
【问题描述】:
我正在尝试连接 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`
我尝试使用 try 和 catch 但看不到实际错误。函数和参数如下所示
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 函数时做错了什么,当我使用在线肥皂呼叫服务时,这很好用,有人可以帮我解决这个问题吗?
谢谢
【问题讨论】:
标签: php afas-online