【发布时间】:2016-01-14 08:48:26
【问题描述】:
我正在尝试将 FedEx 的跟踪服务集成到我的 web 应用程序中,但我不断收到此错误..
严重性:失败
来源:prxy
代码:9004
消息: 远程 EJB 方法:未调用跟踪。无法创建远程 bean。 异常:javax.naming.NamingException:无法找到主要 代表【根异常为 javax.naming.NamingException: 无法 寻找主要代表]。原因:javax.naming.NamingException: 无法找到主要代表 [根例外是 javax.naming.NamingException: 找不到主要代表]
请求
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP- ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://fedex.com/ws/track/v10"><SOAP-ENV:Body><ns1:TrackRequest> <ns1:WebAuthenticationDetail><ns1:ParentCredential><ns1:Key>#########</ns1:Key><ns1:Password>###########</ns1:Password></ns1:ParentCredential><ns1:UserCredential><ns1:Key>#############</ns1:Key><ns1:Password>###########</ns1:Password></ns1:UserCredential></ns1:WebAuthenticationDetail><ns1:ClientDetail><ns1:AccountNumber>#########</ns1:AccountNumber><ns1:MeterNumber>###########</ns1:MeterNumber></ns1:ClientDetail><ns1:TransactionDetail><ns1:CustomerTransactionId>*** Track using PHP ***</ns1:CustomerTransactionId></ns1:TransactionDetail><ns1:Version><ns1:ServiceId>trck</ns1:ServiceId><ns1:Major>10</ns1:Major><ns1:Intermediate>0</ns1:Intermediate><ns1:Minor>0</ns1:Minor></ns1:Version><ns1:SelectionDetails><ns1:PackageIdentifier> <ns1:Type>TRACKING_NUMBER_OR_DOORTAG</ns1:Type><ns1:Value>449044304137821</ns1:Value></ns1:PackageIdentifier><ns1:ShipmentAccountNumber>########</ns1:ShipmentAccountNumber> </ns1:SelectionDetails></ns1:TrackRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
回应
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><TrackReply xmlns="http://fedex.com/ws/track/v10"><HighestSeverity>FAILURE</HighestSeverity><Notifications><Severity>FAILURE</Severity><Source>prxy</Source><Code>9004</Code><Message>Remote EJB method: track not called. Unable to create the remote bean. Exception: javax.naming.NamingException: unable to find primary representative [Root exception is javax.naming.NamingException: unable to find primary representative]. Cause: javax.naming.NamingException: unable to find primary representative [Root exception is javax.naming.NamingException: unable to find primary representative]</Message></Notifications></TrackReply></SOAP-ENV:Body></SOAP-ENV:Envelope>
我正在使用 Laravel 框架,此 Fedex 集成使用了三个文件,即包含 XML 数据的 TrackService_v10.wsdl,包含发送请求的 php 函数的 TrackWebServiceClient.php5 和 fedex-common.php5其中还包含包含要发布的输入的 php 函数。
我尝试在 Internet 和 FedEx 上的开发人员和资源中心上到处寻找,但我真的无法让它工作。我也不明白这个 SOAP 请求。此外,联邦快递说他们没有程序员来帮助我。有人可以帮忙吗?提前致谢。
【问题讨论】: