无法从 Fedex API 获得正确的费率回复

发布于 2024-10-30 04:47:45 字数 4682 浏览 3 评论 0原文

我正在将 fedEx ratesService 集成到我的应用程序中,但在发送费率请求时不断收到相同的错误:

<v9:Notifications xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <v9:Severity>WARNING</v9:Severity>
        <v9:Source>crs</v9:Source>
        <v9:Code>556</v9:Code>
        <v9:Message>There are no valid services available.</v9:Message>
        <v9:LocalizedMessage>There are no valid services available.</v9:LocalizedMessage>
</v9:Notifications>

我已将其用作费率请求:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v9="http://fedex.com/ws/rate/v9">
  <soapenv:Body>
    <v9:RateRequest>
      <v9:WebAuthenticationDetail>
        <v9:UserCredential>
          <v9:Key>thisIsMyKey</v9:Key>
          <v9:Password>thisIsMyPassword</v9:Password>
        </v9:UserCredential>
     </v9:WebAuthenticationDetail>
     <v9:ClientDetail>
        <v9:AccountNumber>123456789</v9:AccountNumber>
        <v9:MeterNumber>987654321</v9:MeterNumber>
     </v9:ClientDetail>
     <v9:TransactionDetail>
        <v9:CustomerTransactionId>Rate a Single Package V9</v9:CustomerTransactionId>
     </v9:TransactionDetail>
     <v9:Version>
        <v9:ServiceId>crs</v9:ServiceId>
        <v9:Major>9</v9:Major>
        <v9:Intermediate>0</v9:Intermediate>
        <v9:Minor>0</v9:Minor>
     </v9:Version>
     <v9:ReturnTransitAndCommit>true</v9:ReturnTransitAndCommit>
     <v9:RequestedShipment>
        <v9:ShipTimestamp>2011-04-07T09:30:47-05:00</v9:ShipTimestamp>
        <v9:DropoffType>REGULAR_PICKUP</v9:DropoffType>
        <v9:PackagingType>YOUR_PACKAGING</v9:PackagingType>
        <v9:Shipper>
           <v9:Contact>
              <v9:PersonName>Henri</v9:PersonName>
      <v9:PhoneNumber>+31612345678</v9:PhoneNumber>
           </v9:Contact>
           <v9:Address>
              <v9:StreetLines>Noordeinde 64</v9:StreetLines>
              <v9:City>Den Haag</v9:City>
              <v9:StateOrProvinceCode>ZH</v9:StateOrProvinceCode>
              <v9:PostalCode>2514GK</v9:PostalCode>
              <v9:CountryCode>NL</v9:CountryCode>
           </v9:Address>
        </v9:Shipper>
        <v9:Recipient>
           <v9:Contact>
              <v9:PersonName>Arnout</v9:PersonName>
      <v9:PhoneNumber>+31612348765</v9:PhoneNumber>
           </v9:Contact>
           <v9:Address>
              <v9:StreetLines>Binnenhof 16</v9:StreetLines>
              <v9:City>Den Haag</v9:City>
              <v9:StateOrProvinceCode>ZH</v9:StateOrProvinceCode>
              <v9:PostalCode>2513AA</v9:PostalCode>
              <v9:CountryCode>NL</v9:CountryCode>
           </v9:Address>
        </v9:Recipient>
        <v9:ShippingChargesPayment>
           <v9:PaymentType>SENDER</v9:PaymentType>
           <v9:Payor>
             <v9:AccountNumber>123456789</v9:AccountNumber>
     <v9:CountryCode>NL</v9:CountryCode>
           </v9:Payor>
        </v9:ShippingChargesPayment>
        <v9:RateRequestTypes>LIST</v9:RateRequestTypes>
    <v9:PackageCount>1</v9:PackageCount>
        <v9:PackageDetail>INDIVIDUAL_PACKAGES</v9:PackageDetail>
    <v9:RequestedPackageLineItems>
       <v9:SequenceNumber>1</v9:SequenceNumber>
       <v9:Weight>
              <v9:Units>KG</v9:Units>
              <v9:Value>10.0</v9:Value>
       </v9:Weight>
           <v9:Dimensions>
          <v9:Length>12</v9:Length>
      <v9:Width>8</v9:Width>
      <v9:Height>6</v9:Height>
      <v9:Units>CM</v9:Units>
           </v9:Dimensions>
        </v9:RequestedPackageLineItems>
     </v9:RequestedShipment>
  </v9:RateRequest>

目标端点是 https://wsbeta.fedex.com:443/web-services/rate 。我使用 SOAP UI 来测试,但这给了我同样的错误。 有人知道如何检查实际的故障/错误是什么吗?

更新:根据 Fedex 支持,我需要添加 ServiceType。虽然这适用于国家/地区之间的运输,但不适用于美国境外的国内运输。有人有线索吗?

I'm integrating fedEx rateService into my application and I keep getting the same error when sending a rate request:

<v9:Notifications xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <v9:Severity>WARNING</v9:Severity>
        <v9:Source>crs</v9:Source>
        <v9:Code>556</v9:Code>
        <v9:Message>There are no valid services available.</v9:Message>
        <v9:LocalizedMessage>There are no valid services available.</v9:LocalizedMessage>
</v9:Notifications>

I have used this as a rate request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v9="http://fedex.com/ws/rate/v9">
  <soapenv:Body>
    <v9:RateRequest>
      <v9:WebAuthenticationDetail>
        <v9:UserCredential>
          <v9:Key>thisIsMyKey</v9:Key>
          <v9:Password>thisIsMyPassword</v9:Password>
        </v9:UserCredential>
     </v9:WebAuthenticationDetail>
     <v9:ClientDetail>
        <v9:AccountNumber>123456789</v9:AccountNumber>
        <v9:MeterNumber>987654321</v9:MeterNumber>
     </v9:ClientDetail>
     <v9:TransactionDetail>
        <v9:CustomerTransactionId>Rate a Single Package V9</v9:CustomerTransactionId>
     </v9:TransactionDetail>
     <v9:Version>
        <v9:ServiceId>crs</v9:ServiceId>
        <v9:Major>9</v9:Major>
        <v9:Intermediate>0</v9:Intermediate>
        <v9:Minor>0</v9:Minor>
     </v9:Version>
     <v9:ReturnTransitAndCommit>true</v9:ReturnTransitAndCommit>
     <v9:RequestedShipment>
        <v9:ShipTimestamp>2011-04-07T09:30:47-05:00</v9:ShipTimestamp>
        <v9:DropoffType>REGULAR_PICKUP</v9:DropoffType>
        <v9:PackagingType>YOUR_PACKAGING</v9:PackagingType>
        <v9:Shipper>
           <v9:Contact>
              <v9:PersonName>Henri</v9:PersonName>
      <v9:PhoneNumber>+31612345678</v9:PhoneNumber>
           </v9:Contact>
           <v9:Address>
              <v9:StreetLines>Noordeinde 64</v9:StreetLines>
              <v9:City>Den Haag</v9:City>
              <v9:StateOrProvinceCode>ZH</v9:StateOrProvinceCode>
              <v9:PostalCode>2514GK</v9:PostalCode>
              <v9:CountryCode>NL</v9:CountryCode>
           </v9:Address>
        </v9:Shipper>
        <v9:Recipient>
           <v9:Contact>
              <v9:PersonName>Arnout</v9:PersonName>
      <v9:PhoneNumber>+31612348765</v9:PhoneNumber>
           </v9:Contact>
           <v9:Address>
              <v9:StreetLines>Binnenhof 16</v9:StreetLines>
              <v9:City>Den Haag</v9:City>
              <v9:StateOrProvinceCode>ZH</v9:StateOrProvinceCode>
              <v9:PostalCode>2513AA</v9:PostalCode>
              <v9:CountryCode>NL</v9:CountryCode>
           </v9:Address>
        </v9:Recipient>
        <v9:ShippingChargesPayment>
           <v9:PaymentType>SENDER</v9:PaymentType>
           <v9:Payor>
             <v9:AccountNumber>123456789</v9:AccountNumber>
     <v9:CountryCode>NL</v9:CountryCode>
           </v9:Payor>
        </v9:ShippingChargesPayment>
        <v9:RateRequestTypes>LIST</v9:RateRequestTypes>
    <v9:PackageCount>1</v9:PackageCount>
        <v9:PackageDetail>INDIVIDUAL_PACKAGES</v9:PackageDetail>
    <v9:RequestedPackageLineItems>
       <v9:SequenceNumber>1</v9:SequenceNumber>
       <v9:Weight>
              <v9:Units>KG</v9:Units>
              <v9:Value>10.0</v9:Value>
       </v9:Weight>
           <v9:Dimensions>
          <v9:Length>12</v9:Length>
      <v9:Width>8</v9:Width>
      <v9:Height>6</v9:Height>
      <v9:Units>CM</v9:Units>
           </v9:Dimensions>
        </v9:RequestedPackageLineItems>
     </v9:RequestedShipment>
  </v9:RateRequest>

The target endpoint is https://wsbeta.fedex.com:443/web-services/rate. I use SOAP UI to test , but this gives me the same error.
Anyone got a clue on how to check what the actual fault/error is?

UPDATE: According to Fedex support, I needed to add a ServiceType. While this works for shipments between countries, it does not work for national shipments outside the US. Anyone got a clue?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

肥爪爪 2024-11-06 04:47:45

我与联邦快递技术支持人员交谈,他们说他们没有针对荷兰的全国服务(只有“往返”,没有“境内”)。所以“错误”实际上是正确的:没有可用的有效服务!

I talked to FedEx tech support and they said they don't have a national service for the Netherlands (only 'to/from', not 'within'). So the 'error' is actually correct: no valid services available!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文