简体   繁体   English

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

[英]FedEx web Integration ERROR CODE 9004

I am trying to integrate the tracking services of FedEx on to my webapp and I keep getting this error.. 我正在尝试将FedEx的跟踪服务集成到我的webapp上,并且我一直收到此错误。

Severity: FAILURE 严重程度:失败
Source: prxy 来源:prxy
Code: 9004 代码:9004
Message: Remote EJB method: track not called. 消息:远程EJB方法:跟踪未调用。 Unable to create the remote bean. 无法创建远程bean。 Exception: javax.naming.NamingException: unable to find primary representative [Root exception is javax.naming.NamingException: unable to find primary representative]. 异常:javax.naming.NamingException:无法找到主要代表[根异常是javax.naming.NamingException:无法找到主要代表]。 Cause: javax.naming.NamingException: unable to find primary representative [Root exception is javax.naming.NamingException: unable to find primary representative] 原因:javax.naming.NamingException:无法找到主要代表[root异常是javax.naming.NamingException:无法找到主要代表]

Request 请求

<?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>

Response 响应

<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>

I am using the Laravel framework and there are three files used for this Fedex integration, ie, TrackService_v10.wsdl which contains the XML data, TrackWebServiceClient.php5 which contains the php functions to send a request and the fedex-common.php5 which also contains the php functions containing the input to post. 我正在使用Laravel框架,有三个文件用于此Fedex集成,即包含XML数据的TrackService_v10.wsdl,包含发送请求的php函数的TrackWebServiceClient.php5以及包含此函数的fedex-common.php5包含要发布的输入的php函数。

I have tried looking everywhere on the internet and the Developer and resource center on FedEx but I really cant get it working. 我曾尝试在互联网上寻找各地以及联邦快递的开发人员和资源中心,但我真的无法让它发挥作用。 I also dont understand this SOAP requests. 我也不理解这个SOAP请求。 Also, FedEx says they dont have programmers to help me with this. 此外,FedEx表示他们没有程序员来帮助我。 Can anyone please help? 有人可以帮忙吗? Thanks in advance. 提前致谢。

I have been having the exact same issue. 我一直有同样的问题。 After banging my head on the desk for hours, I came across this post - https://stackoverflow.com/a/10941234/5632365 . 在我的桌子上敲了几个小时之后,我发现了这篇文章 - https://stackoverflow.com/a/10941234/5632365 It pertains to v5 of the WSDL file (current is 10), but basically you need to remove "beta" from the URL on line 2296. 它属于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>

Should be 应该

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

And magically everything will (should) start to work. 神奇地,一切都将(应该)开始起作用。 Hope this helps you as much as it did me! 希望这对你有所帮助!

Removing beta doesn't seem to be the good solution anymore. 删除beta似乎不再是一个好的解决方案。

I've been in contact with Fedex support and the issue actually comes when you set invalid "ParentCredentials". 我一直在联系Fedex支持,当你设置无效的“ParentCredentials”时,问题就出现了。

In my case I only have to use "UserCredential", "ParentCredentials" was set to "XXX" if empty in the (Java) example provided by Fedex. 在我的情况下,我只需要使用“UserCredential”,如果在Fedex提供的(Java)示例中为空,则“ParentCredentials”设置为“XXX”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM