首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >联邦快递API,身份验证失败

联邦快递API,身份验证失败
EN

Stack Overflow用户
提问于 2015-04-19 10:55:28
回答 4查看 18.7K关注 0票数 4

我是集成联邦快递跟踪,费率和运输API在我的应用程序,但我被困在一个问题。

当我使用开发人员帐户详细信息运行我的代码时,一切都会正常运行。但是,当我使用生产密钥运行相同的代码时,它会给出"Error code 1000,Authentication Error"

我已经更新了所有的键,并将URL更改为指向production "https://ws.fedex.com:443/web-services/“。

它似乎不是来自联邦快递端的权限问题,因为标准服务(跟踪)在默认情况下是为生产启用的,这也给出了相同的错误"Error Code 1000,Authentication Error"

下面是SOAP请求和响应XML。

请求:

代码语言:javascript
复制
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header/>
<soap:Body>
<RateRequest xmlns="http://fedex.com/ws/rate/v14">
<WebAuthenticationDetail>
<UserCredential>
<Key>AAAAAAAA</Key>
<Password>BBBBBBBBB</Password>
</UserCredential>
</WebAuthenticationDetail>
<ClientDetail>
<AccountNumber>CCCCCCCC</AccountNumber>
<MeterNumber>DDDDDDDD</MeterNumber>
</ClientDetail>
<TransactionDetail>
<CustomerTransactionId>java sample - Rate Request</CustomerTransactionId>
</TransactionDetail>
<Version>
<ServiceId>crs</ServiceId>
<Major>14</Major>
<Intermediate>0</Intermediate>
<Minor>0</Minor>
</Version>
<ReturnTransitAndCommit>true</ReturnTransitAndCommit>
<RequestedShipment>
<ShipTimestamp>2015-04-19T18:21:11.542+05:30</ShipTimestamp>
<DropoffType>REGULAR_PICKUP</DropoffType>
<ServiceType>FEDEX_GROUND</ServiceType>
<PackagingType>YOUR_PACKAGING</PackagingType>
<TotalInsuredValue>
<Currency>USD</Currency>
</TotalInsuredValue>
<Shipper>
<Address>
<StreetLines>1310 Piper Dr</StreetLines>
<City>Milpitas</City>
<StateOrProvinceCode>CA</StateOrProvinceCode>
<PostalCode>95035</PostalCode>
<CountryCode>US</CountryCode>
</Address>
</Shipper>
<Recipient>
<Address>
<StreetLines>3370 E. La Palma Avenue</StreetLines>
<City>Anaheim</City>
<StateOrProvinceCode>CA</StateOrProvinceCode>
<PostalCode>92806</PostalCode>
<CountryCode>US</CountryCode>
<Residential>false</Residential>
</Address>
</Recipient>
<ShippingChargesPayment>
<PaymentType>SENDER</PaymentType>
<Payor>
<ResponsibleParty>
<AccountNumber>ACCOUNT_NUMBER_PRESENT</AccountNumber>
</ResponsibleParty>
</Payor>
</ShippingChargesPayment>
<RateRequestTypes>ACCOUNT</RateRequestTypes>
<PackageCount>1</PackageCount>
<RequestedPackageLineItems>
<GroupPackageCount>1</GroupPackageCount>
<InsuredValue>
<Currency>USD</Currency>
<Amount>100.00</Amount>
</InsuredValue>
<Weight>
<Units>LB</Units>
<Value>10</Value>
</Weight>
<Dimensions>
<Length>1</Length>
<Width>1</Width>
<Height>1</Height>
<Units>IN</Units>
</Dimensions>
<SpecialServicesRequested/>
</RequestedPackageLineItems>
</RequestedShipment>
</RateRequest>
</soap:Body>
</soap:Envelope>

答复:

代码语言:javascript
复制
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<v14:RateReply xmlns:v14="http://fedex.com/ws/rate/v14">
<v14:HighestSeverity>ERROR</v14:HighestSeverity>
<v14:Notifications>
<v14:Severity>ERROR</v14:Severity>
<v14:Source>prof</v14:Source>
<v14:Code>1000</v14:Code>
<v14:Message>Authentication Failed</v14:Message>
</v14:Notifications>
<v14:TransactionDetail>
<v14:CustomerTransactionId>java sample - Rate Request</v14:CustomerTransactionId>
</v14:TransactionDetail>
<v14:Version>
<v14:ServiceId>crs</v14:ServiceId>
<v14:Major>14</v14:Major>
<v14:Intermediate>0</v14:Intermediate>
<v14:Minor>0</v14:Minor>
</v14:Version>
</v14:RateReply>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

请帮我解决这个问题:

EN

回答 4

Stack Overflow用户

回答已采纳

发布于 2015-05-06 19:59:37

如果您在生产中得到了所有web服务的错误,那么您就有了一个关键问题。从FedEx的developer区域获取新的凭据,或者尝试在fedex.com上发送电子邮件给new支持

票数 1
EN

Stack Overflow用户

发布于 2015-05-21 09:41:44

我从上周开始面对这个问题,并最终找到了解决方案,在与FedEx技术Person.See讨论了为什么我们面临这样的错误后,我们都是因为开发人员测试帐户而产生的,我们应该记住,测试帐号从"6“开始生产& "5”是正确的测试Key.So --当您得到错误代码1000的验证问题时,请检查您的测试密钥。

如果这对我没有帮助的话请给我回复。

票数 3
EN

Stack Overflow用户

发布于 2017-08-23 21:40:04

https://www.xadapter.com/test-use-fedex-account-number-test-account-number-password-use/

用户帐户密码不同于我们在web服务中提供的密码。请查看上面的链接

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29728882

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档