我尝试从 Fedex 接收运费,所以我发送给 Fedex (https://wsbeta.fedex.com:443/web-services/rate) 请求,如下所示(它被序列化为 xml 对象):
<?xml version=\"1.0\" encoding=\"utf-16\"?>
<RateRequest xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">
<WebAuthenticationDetail xmlns=\"http://fedex.com/ws/rate/v10\">
<UserCredential>
<Key>some key</Key>
<Password>some password</Password>
</UserCredential>
</WebAuthenticationDetail>
<ClientDetail xmlns=\"http://fedex.com/ws/rate/v10\">
<AccountNumber>some account number</AccountNumber>
<MeterNumber>some meter number</MeterNumber>
</ClientDetail>
<TransactionDetail xmlns=\"http://fedex.com/ws/rate/v10\">
<CustomerTransactionId>some CustomerTransactionId</CustomerTransactionId>
</TransactionDetail>
<Version xmlns=\"http://fedex.com/ws/rate/v10\">
<ServiceId>crs</ServiceId>
<Major>10</Major>
<Intermediate>0</Intermediate>
<Minor>0</Minor>
</Version>
<ReturnTransitAndCommit xmlns=\"http://fedex.com/ws/rate/v10\">true</ReturnTransitAndCommit>
<CarrierCodes xmlns=\"http://fedex.com/ws/rate/v10\">FDXE</CarrierCodes>
<RequestedShipment xmlns=\"http://fedex.com/ws/rate/v10\">
<ShipTimestamp>2012-08-10T11:42:00.2669059+02:00</ShipTimestamp>
<ServiceType>GROUND_HOME_DELIVERY</ServiceType>
<PackagingType>YOUR_PACKAGING</PackagingType>
<TotalInsuredValue>
<Currency>USD</Currency>
</TotalInsuredValue>
<Shipper>
<Address>
<City>San Francisco</City>
<StateOrProvinceCode>CA</StateOrProvinceCode>
<PostalCode>94129</PostalCode>
<CountryCode>US</CountryCode>
</Address>
</Shipper>
<Recipient>
<Address>
<StreetLines>S</StreetLines>
<StreetLines>s</StreetLines>
<City>New York</City>
<StateOrProvinceCode>NY</StateOrProvinceCode>
<PostalCode>10001</PostalCode>
<CountryCode>US</CountryCode>
<Residential>true</Residential>
</Address>
</Recipient>
<ShippingChargesPayment />
<RateRequestTypes>ACCOUNT</RateRequestTypes>
<RateRequestTypes>LIST</RateRequestTypes>
<PackageCount>1</PackageCount>
<RequestedPackageLineItems>
<SequenceNumber>1</SequenceNumber>
<GroupPackageCount>1</GroupPackageCount>
<InsuredValue />
<Weight>
<Units>LB</Units>
<Value>133.00000</Value>
</Weight>
<Dimensions>
<Units>IN</Units>
</Dimensions>
</RequestedPackageLineItems>
</RequestedShipment>
</RateRequest>
我仍然收到两个错误:
- 870 - 服务类型优先于运营商代码;用于评分的服务类型
- 809 - 包裹 1 - 重量丢失或无效。
我应该改变什么来解决这个问题?