有谁有关于 eBay 大型商户服务架构的更多信息吗?
我一直在研究 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
有几件事可能会带来一些澄清:
http://developer.ebay.com/webservices/latest/merchantdataservice.xsd
。注意:这与交易 API XSD 不同。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:
http://developer.ebay.com/webservices/latest/merchantdataservice.xsd
. Note: This is not the same as the Trading API XSD.http://developer.ebay.com/devzone/xml/docs/reference/ebay/AddFixedPriceItem.html#Request.Item.ShippingDetails.ShippingServiceOptions.ShippingService
See where it says
ShippingServiceCodeType links to the page you ultimately found.
Hopefully this helps :)
附带问题的答案:
xs:token 在此处进行了描述。
作为
对于您的主要问题,您必须询问 eBay。
Answer to side question:
xs:token is described here.
as
For your main question, you'd have to be asking eBay.
我终于找到了有关运输服务的答案 。他们(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