联邦快递网络集成错误代码 9004


FedEx web Integration ERROR CODE 9004

我正在尝试将FedEx的跟踪服务集成到我的网络应用程序中,但不断收到此错误。

严重性:失败
来源:prxy
代码:9004
消息: 远程 EJB 方法:不调用磁道。无法创建远程 Bean。 异常:javax.naming.命名异常:找不到主数据库 代表 [根异常是 javax.nameing.命名异常:无法 寻找主要代表]。原因:javax.naming.命名异常: 找不到主要代表 [根异常为 javax.nameing.namemingException: 找不到主要代表]

请求

<?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和Feddex-common.php5,其中还包含包含要发布的输入的php函数。

我尝试在互联网上到处寻找,以及FedEx上的开发人员和资源中心,但我真的无法让它工作。我也不理解这个 SOAP 请求。另外,联邦快递说他们没有程序员来帮助我解决这个问题。谁能帮忙?提前谢谢。

我一直遇到完全相同的问题。在把头撞在桌子上几个小时后,我遇到了这篇文章——https://stackoverflow.com/a/10941234/5632365。它与 WSDL 文件的 v5 有关(当前为 10),但基本上您需要从第 2296 行的 URL 中删除"beta"。

<service name="TrackService">
    <port name="TrackServicePort" binding="ns:TrackServiceSoapBinding">
      <s1:address location="https://wsbeta.fedex.com:443/web-services/track"/>
    </port>
</service>

应该是

<service name="TrackService">
    <port name="TrackServicePort" binding="ns:TrackServiceSoapBinding">
      <s1:address location="https://ws.fedex.com:443/web-services/track"/>
    </port>
</service>

神奇的是,一切都会(应该)开始工作。希望这对你和我一样有帮助!

删除beta似乎不再是好的解决方案。

我一直与Fedex支持人员联系,当您设置无效的"父母凭据"时,问题实际上就出现了。

就我而言,我只需要使用"UserCredential","ParentCredentials"在Fedex提供的(Java)示例中设置为"XXX"。