代码之家  ›  专栏  ›  技术社区  ›  Ryan Elkins

有没有人对易趣的大型商业服务模式有更好的了解?

  •  2
  • Ryan Elkins  · 技术社区  · 15 年前

    我已经和eBay的大型商业服务API竞争了一段时间。很不顺。我终于让消息通过他们的系统,但我对他们的模式有问题。显然,有比模式中定义的更多的限制。

    作为一个例子,该模式定义了运输服务选项,这些选项可能如下所示:

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

    在它们的模式中定义如下:

      <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>
    

    在哪里可以找到ShippingService的有效值?我发现了一个例子,它们具有独特性。这一个是可行的,但我所猜测的其他一切(UPS、upsGround、ups2ndDayAir等)都会导致整个事件返回“无效数据”错误。

    如果有人知道一个有效值列表,或者任何其他能更好地解释易趣大型Merchamt服务(LMS)模式的资源,请告诉我。

    作为一个附带问题,什么是确切的“类型”{ http://www.w3.org/2001/XMLSchema }令牌“?JAXB当前将其转换为字符串。

    3 回复  |  直到 15 年前
        1
  •  3
  •   Overflow Helper    15 年前

    一些可能会带来一些清晰的东西:

    1. eBay SDK只支持交易API,不支持大型商家服务。
    2. 易趣大商户服务的XSD位于 http://developer.ebay.com/webservices/latest/merchantdataservice.xsd . 注意:这与交易API XSD不同。
    3. 解决ShippingService困境的最简单方法是添加FixedPriceItem的调用引用并查看 http://developer.ebay.com/devzone/xml/docs/reference/ebay/AddFixedPriceItem.html#Request.Item.ShippingDetails.ShippingServiceOptions.ShippingService

    看看上面写的是什么

    适用值:见 发货服务代码类型

    ShippingServiceCodeType链接到最终找到的页面。

    希望这有帮助:)

        2
  •  2
  •   bmargulies    15 年前

    回答问题:

    描述了xs:token here .

    作为

    令牌数据类型还包含 字符,但XML处理器将 移除换行,回车, 制表符、前导空格和尾随空格,以及 多个空格。

    对于你的主要问题,你必须问易趣。

        3
  •  1
  •   Ryan Elkins    15 年前

    我终于找到了 answer concerning Shipping Service . 他们的(易趣)文档比我最初意识到的要好得多,尽管它仍然需要一些搜索来找到数据——它确实在那里。

    EBAY Trading API Call Reference