有谁有关于 eBay 大型商户服务架构的更多信息吗?

发布于 2024-08-12 00:51:38 字数 2411 浏览 7 评论 0原文

我一直在研究 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 的有效值?我找到了一个例子,其中他们有 USPSPriority。这个可行,但我猜测的其他所有内容(UPS、UPSGround、UPS2ndDayAir 等)都会导致整个内容返回,并出现无效数据 错误。

如果有人知道有效值列表或任何其他可以更好地解释 eBay 大型商户服务 (LMS) 架构的资源,请告诉我。

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

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.

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

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

发布评论

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

评论(3

三生路 2024-08-19 00:51:38

有几件事可能会带来一些澄清:

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

看看它说的地方

适用值:参见
运输服务代码类型

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

希望这有帮助:)

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

吐个泡泡 2024-08-19 00:51:38

附带问题的答案:

xs:token 在此处进行了描述。

作为

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

对于您的主要问题,您必须询问 eBay。

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.

梦行七里 2024-08-19 00:51:38

我终于找到了有关运输服务的答案 。他们(eBay 的)文档比我最初意识到的要好得多,尽管仍然需要花一些时间才能找到数据 - 它似乎确实在那里。

EBAY 交易 API 调用参考

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

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