Question

I've been wrestling with eBay's Large Merchant Services API for a while. It's been rough. I finally have messages going all the way through their system, but I'm having issues with their schema. Apparently there are alot more restrictions than what is defined in the schema.

As an example, the schema defines shipping service options, which may look something like this:

  <ShippingServiceOptions>
    <ShippingService>USPSPriority</ShippingService>
    <ShippingServiceCost currencyID="USD">7.99</ShippingServiceCost>
    <ShippingServiceAdditionalCost currencyID="USD">0.0</ShippingServiceAdditionalCost>
    <ShippingServicePriority>1</ShippingServicePriority>
  </ShippingServiceOptions>

and is defined in their schema like so:

  <complexType name="ShippingServiceOptionsType">
    <complexContent>
      <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
        <sequence>
          <element name="ShippingInsuranceCost" type="{urn:ebay:apis:eBLBaseComponents}AmountType" minOccurs="0"/>
          <element name="ShippingService" type="{http://www.w3.org/2001/XMLSchema}token" minOccurs="0"/>
          <element name="ShippingServiceCost" type="{urn:ebay:apis:eBLBaseComponents}AmountType" minOccurs="0"/>
          <element name="ShippingServiceAdditionalCost" type="{urn:ebay:apis:eBLBaseComponents}AmountType" minOccur ="0"/>
          <element name="ShippingServicePriority" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
          <element name="ExpeditedService" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
          <element name="ShippingTimeMin" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
          <element name="ShippingTimeMax" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
          <element name="ShippingSurcharge" type="{urn:ebay:apis:eBLBaseComponents}AmountType" minOccurs="0"/>
          <element name="FreeShipping" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
        </sequence>
      </restriction>
    </complexContent>
  </complexType>

Where can I find valid values for ShippingService? I found an example where they has USPSPriority. That one works, but everything else I've guessed at (UPS, UPSGround, UPS2ndDayAir, etc) results in the entire thing getting returned with an error of Invalid data.

If anyone knows a list of valid values, or any other resources that better explains eBay's schema for Large Merchamt Services (LMS) please let me know.

As a side question, what exatly is a type of "{http://www.w3.org/2001/XMLSchema}token"? JAXB currently converts it to a String.

Was it helpful?

Solution

A few things that might bring some clarity:

  1. The eBay SDK only supports the Trading API, not Large Merchant Services.
  2. eBay Large Merchant Service's XSD is located at http://developer.ebay.com/webservices/latest/merchantdataservice.xsd. Note: This is not the same as the Trading API XSD.
  3. The easiest way to have solved your ShippingService dilemma would have been going to AddFixedPriceItem's Call Reference and seeing http://developer.ebay.com/devzone/xml/docs/reference/ebay/AddFixedPriceItem.html#Request.Item.ShippingDetails.ShippingServiceOptions.ShippingService

See where it says

Applicable values: See ShippingServiceCodeType

ShippingServiceCodeType links to the page you ultimately found.

Hopefully this helps :)

OTHER TIPS

Answer to side question:

xs:token is described here.

as

The token data type also contains characters, but the XML processor will remove line feeds, carriage returns, tabs, leading and trailing spaces, and multiple spaces.

For your main question, you'd have to be asking eBay.

I finally found the answer concerning Shipping Service. Their (eBay's) documentation is much better than I had initially realized, although it still can take a bit of poking around to find the data - it does appear to be there.

EBAY Trading API Call Reference

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top