doumaji6215 2015-07-07 10:54
浏览 287
已采纳

显示UPS的交付状态

I am using the UPS courier service for the delivery of the packages. In my website I need to display the delivery status of a particular order using the tracking number, I used the following example, https://github.com/chetan/php-ups-api

I added the access key, username and password in the config file. and I am using tracking.php file fro this library for testing purpose. But I get the following error,

Fatal error: require_once(): Failed opening required 'XML/Unserializer.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/project/php-ups-api-master/UpsAPI/Client.php on line 119 

Can anyone please tell me where can I get this file.

I have also tried using https://www.ups.com/upsdeveloperkit/downloadresource?loc=en_US

\project\TrackingPACKAGE\TRACKINGWebServices\CodeSamples\Track\PHP\SoapTrackClient.php file

I have added, $wsdl = "../../../SCHEMAS-WSDLs/Track.wsdl"; as the parameter.

But get the following error,

SoapFault Object ( [message:protected] => An exception has been raised as a result of client data. [string:Exception:private] => [code:protected] => 0 [file:protected] => /home/project/TrackingPACKAGE/TRACKINGWebServices/CodeSamples/Track/PHP/SoapTrackClient.php [line:protected] => 62 [trace:Exception:private] => Array ( [0] => Array ( [file] => /home/project/TrackingPACKAGE/TRACKINGWebServices/CodeSamples/Track/PHP/SoapTrackClient.php [line] => 62 [function] => __soapCall [class] => SoapClient [type] => -> [args] => Array ( [0] => ProcessTrack [1] => Array ( [0] => ) ) ) ) [previous:Exception:private] => [faultstring] => An exception has been raised as a result of client data. [faultcode] => Client [faultcodens] => http://schemas.xmlsoap.org/soap/envelope/ [detail] => stdClass Object ( [Errors] => stdClass Object ( [ErrorDetail] => stdClass Object ( [Severity] => Authentication [PrimaryErrorCode] => stdClass Object ( [Code] => 250002 [Description] => Invalid Authentication Information. ) ) ) ) [xdebug_message] => ( ! ) SoapFault: An exception has been raised as a result of client data. in /home/project/TrackingPACKAGE/TRACKINGWebServices/CodeSamples/Track/PHP/SoapTrackClient.php on line 62 Call Stack #TimeMemoryFunctionLocation 10.0006132036{main}( )../SoapTrackClient.php:0 20.0079240060SoapClient->__soapCall( )../SoapTrackClient.php:62 )

Please help me.

  • 写回答

1条回答 默认 最新

  • duanmo6937 2015-07-07 10:58
    关注

    Error message tell that you need install PEAR Serializer package: https://pear.php.net/package/XML_Serializer/

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容