开发者

Can't get proper rateReply from Fedex API

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://sch开发者_高级运维emas.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?


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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜