我已经和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当前将其转换为字符串。