【问题标题】:AFAS wsdl Getting error with SOAP function callAFAS wsdl 调用 SOAP 函数时出错
【发布时间】: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


    【解决方案1】:

    错误文本 Er is een onverwachte fout opgetreden. 来自 AFAS 服务器,但错误的整个堆栈跟踪并未通过 API 传递。 因此,您应该检查 Omgevingslogboek 中的 Profit Windows 错误的整个堆栈跟踪所包含的内容。 转到开始菜单 F4 / Algemeen / Omgeving / Beheer / Omgevingslogboek

    如果您需要任何进一步的帮助,请随时与 AFAS 支持中心或 connect.afas.nl 联系。

    编辑:使用 AFAS AppConnector 的即插即用库查看 this repository on GitHub

    【讨论】:

      【解决方案2】:

      这个问题已经有点老了,但还好,还是给遇到困难的人:

      我遇到了类似的问题,这与 TLS 1.2 有关,这是与 AFAS 服务器安全连接所必需的(请参阅下面的说明)

      但首先让您的 Getconnector 在 AFAS 的在线测试门户中工作:https://connect.afas.nl/

      这是一个测试工作台,用于查看您是否使用了正确的参数。因此,如果您发布了一个令牌并配置了应用程序连接器的其余部分。

      在这方面需要帮助,您可以访问他们的知识中心:https://help.afas.nl/?query=Getconnector

      在使用 AFAS 的网络服务时,请记住它们使用 TLS1.2 安全连接。因此,请检查您是否已解决此问题,如果您的计算机没有启用此功能,您必须这样做:

      https://docs.microsoft.com/en-us/sccm/core/plan-design/security/enable-tls-1-2#update-net-framework-to-support-tls-12 配置强加密 配置 .NET Framework 以支持强加密。将 SchUseStrongCrypto 注册表设置设置为 DWORD:00000001。此值禁用 RC4 流密码并需要重新启动。有关此设置的详细信息,请参阅 Microsoft 安全公告 296038。

      确保在通过网络与启用 TLS 1.2 的系统进行通信的任何计算机上设置以下注册表项。例如,Configuration Manager 客户端或任何未安装在站点服务器上的远程站点系统角色。

      对于在 32 位系统上运行的 32 位应用程序或在 64 位系统上运行的 64 位应用程序,更新以下子键值:

      [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727]
            "SystemDefaultTlsVersions" = dword:00000001
            "SchUseStrongCrypto" = dword:00000001
      [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319]
            "SystemDefaultTlsVersions" = dword:00000001
            "SchUseStrongCrypto" = dword:00000001
      

      对于在 64 位系统上运行的 32 位应用程序,请更新以下子键值:

      [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v2.0.50727]
            "SystemDefaultTlsVersions" = dword:00000001
            "SchUseStrongCrypto" = dword:00000001
      [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319]
            "SystemDefaultTlsVersions" = dword:00000001
            "SchUseStrongCrypto" = dword:00000001
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2018-04-19
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-05-08
        • 2022-07-28
        相关资源
        最近更新 更多