【问题标题】:Aramex Rate calculator APT returning error code "ISE01"Aramex 汇率计算器 APT 返回错误代码“ISE01”
【发布时间】:2014-11-17 04:14:24
【问题描述】:

Aramex 汇率计算器 API 返回错误代码 ISE01 和以下错误消息:

请求时获取计算速率时发生内部服务器错误

这个错误的原因是什么?

以下是 Aramex 汇率计算器 API 的示例代码:

<?php
$params = array(
    'ClientInfo'            => array(
                                'AccountCountryCode'    => 'JO',
                                'AccountEntity'         => 'AMM',
                                'AccountNumber'         => '00000',
                                'AccountPin'            => '000000',
                                'UserName'              => 'user@company.com',
                                'Password'              => '000000000',
                                'Version'               => 'v1.0'
                            ),

    'Transaction'           => array(
                                'Reference1'            => '001' 
                            ),

    'OriginAddress'         => array(
                                'City'                  => 'Amman',
                                'CountryCode'               => 'JO'
                            ),

    'DestinationAddress'    => array(
                                'City'                  => 'Dubai',
                                'CountryCode'           => 'AE'
                            ),
    'ShipmentDetails'       => array(
                                'PaymentType'            => 'P',
                                'ProductGroup'           => 'EXP',
                                'ProductType'            => 'PPX',
                                'ActualWeight'           => array('Value' => 5, 'Unit' => 'KG'),
                                'ChargeableWeight'       => array('Value' => 5, 'Unit' => 'KG'),
                                'NumberOfPieces'         => 5
                            )
);

$soapClient = new SoapClient('http://url/to/wsdl.wsdl', array('trace' => 1));
$results = $soapClient->CalculateRate($params); 

echo '<pre>';
print_r($results);
die();
?>

【问题讨论】:

  • 内部服务器错误表示服务提供商的代码中存在未处理的异常或错误。您需要联系服务提供商; SO 上的任何人都无法帮助您。
  • 访问 askleo.com/whats_an_internal_server_error_and_how_do_i_fix_it 并根据服务器上存在问题,我尝试使用示例代码 ans wsdl 文件,但由于我没有用户名、pswd 和帐户信息,它给出我验证错误。
  • “ISE01”似乎不是valid error code
  • 什么是url/to/wsdl.wsdl?没有 WSDL 文件时很难分辨出什么问题...内部服务器错误可能不是服务器端的,我的意思是错误本身是,但在某些情况下它可能会出现而不是 400 Bad Request...
  • ...或502 Bad Gateway,如果它是云系统...甚至403 Forbbidden404 Not Found ...实际上有很多服务器确实返回503而不是404,当他们使用重写时……可能是故意的。

标签: php shipping aramex


【解决方案1】:

只需下载WSDL FILE,将其放在服务器上的某个位置,然后将这一行更改为更正(修复网址!):

$soapClient = new SoapClient('http://url/to/wsdl.wsdl', array('trace' => 1));

-

您的 SOAP 客户端根本无法真正识别没有指示的 CalculateRate 命令...

PS。为我工作,刚刚尝试过。

【讨论】:

  • 嗨。你能分享你的回应吗? URL 不是问题(至少在我的情况下),因为我正在更改它。此外,如果没有输入 WSDL 的正确 URL/路径,服务器将不会响应内部服务器错误。服务器确实会响应验证,例如不正确的凭据等。但是,如果请求正确,它会返回内部错误。
  • 这是正确答案,你能接受吗?您必须将http://url/to/wsdl.wsdl 替换为指向服务器上托管的WDSL 文件的URL。 Aramex 应该为您提供 WDSL 文件。
猜你喜欢
  • 1970-01-01
  • 2015-08-21
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-05-19
  • 2016-05-06
相关资源
最近更新 更多