【发布时间】:2014-03-22 21:47:58
【问题描述】:
我正在使用 java 中的 amazon mws feed api,在向亚马逊发送 ProductImage feed 时遇到了一些问题。
这是我要发送的 xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ProductImage>
<SKU>ABCDORD0001</SKU>
<ImageType>Main</ImageType>
<ImageLocation>http://vocearancio.ingdirect.it/wp-content/uploads/2013/01/bici-1.jpeg</ImageLocation>
</ProductImage>
这是网络服务响应(仅有趣的部分):
<Result>
<MessageID>1</MessageID>
<ResultCode>Error</ResultCode>
<ResultMessageCode>5000</ResultMessageCode>
<ResultDescription>XML Parsing Error at Line 2, Column 15: Found unexpected element 'ProductImage' while parsing the start of this 'AmazonEnvelope' document. Children of this element will be ignored by the parser..</ResultDescription>
</Result>
我不明白他为什么会忽略 ProductImage 标记,我正在按照文档中的示例进行操作,应该没问题。
我正在使用request.setFeedType("_POST_PRODUCT_IMAGE_DATA_"); 发送提要
是因为我缺少信封部分吗?我认为 java API 可以做到这一点,我对其他提要没有任何问题(即使产品没有显示在 sellecentral 库存中)。
这是我的 POST_PRODUCT_DATA 提要(我应该发送的第一个,而不是上面的那个),它没有错误地返回:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Product>
<SKU>ABCDORD0001</SKU>
<LaunchDate>2014-11-10T00:00:00.000+01:00</LaunchDate>
<ReleaseDate>2014-11-10T00:00:00.000+01:00</ReleaseDate>
<Condition>
<ConditionType>New</ConditionType>
</Condition>
<DescriptionData>
<Title>titolo_articolo</Title>
<Brand>brand_item</Brand>
<Description>descrizione_articolo_dett</Description>
<ItemType>sotto_categoria</ItemType>
</DescriptionData>
<ProductData>
<Sports></Sports>
</ProductData>
</Product>
希望有人能帮忙。
【问题讨论】:
标签: java xml xsd amazon-mws