Java Amazon Marketplace API ProductImage提要解析xml时出现意外元素错误

Java Amazon Marketplace API ProductImage提要解析xml时出现意外元素错误,java,xml,xsd,amazon-mws,Java,Xml,Xsd,Amazon Mws,我正在使用java中的amazon mws提要api,在向amazon发送ProductImage提要时遇到了一些问题 这是我要发送的xml: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ProductImage> <SKU>ABCDORD0001</SKU> <ImageType>Main</ImageType> <Imag

我正在使用java中的amazon mws提要api,在向amazon发送ProductImage提要时遇到了一些问题

这是我要发送的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>

我希望有人能帮上忙。

这听起来像是在使用
\u POST\u PRODUCT\u DATA\u
SubmitFeed consant发送图像提要


相反,您需要使用
\u POST\u PRODUCT\u IMAGE\u DATA\u
常量发送图像。这里有一个描述。有关提要所需内容的详细信息,请参阅。它在第47/48页提供了一个示例提要。

问题是我缺少了amazon信封部分,下面是我现在发送到Web服务的正确xml示例:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AmazonEnvelope>
    <Header>
        <DocumentVersion>1.01</DocumentVersion>
        <MerchantIdentifier>A2UAUVMGTII0KR</MerchantIdentifier>
    </Header>
    <MessageType>Product</MessageType>
    <Message>
        <MessageID>1</MessageID>
        <OperationType>Update</OperationType>
        <Product>
            <SKU>ABCDORD0005</SKU>
            <StandardProductID>
                <Type>ISBN</Type>
                <Value>9788478888566</Value>
            </StandardProductID>
            <LaunchDate>2014-03-23T00:00:00.000+01:00</LaunchDate>
            <ReleaseDate>2014-03-23T00:00:00.000+01:00</ReleaseDate>
            <Condition>
                <ConditionType>New</ConditionType>
            </Condition>
            <DescriptionData>
                <Title>Harry Potter and the Philosopher's Stone</Title>
                <Brand>brand_item</Brand>
                <Description>Harry Potter and the Philosopher's Stone is the first novel in the Harry Potter series, written by J. K. Rowling.</Description>
                <Manufacturer>J. K. Rowling</Manufacturer>
                <ItemType>sotto_categoria</ItemType>
            </DescriptionData>
            <ProductData>
                <Sports></Sports>
            </ProductData>
        </Product>
    </Message>
</AmazonEnvelope>

1.01
A2uUVMgTiI0Kr
产品
1.
更新
ABCDORD0005
ISBN
9788478888566
2014-03-23T00:00:00.000+01:00
2014-03-23T00:00:00.000+01:00
新的
哈利·波特与魔法石
品牌商品
《哈利波特与魔法石》是J.K.罗琳写的哈利波特系列小说中的第一部。
J.K.罗琳
分类法

这很好,没有返回错误,只需注意产品在卖家中心购物需要将近1分钟,处理和激活需要10分钟此外,元素StandardProductID非常重要,如果您没有提供正确的代码,您将得到一个缺少的关键错误作为回报。

我使用了正确的提要类型(POST\u PRODUCT\u IMAGE\u 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>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AmazonEnvelope>
    <Header>
        <DocumentVersion>1.01</DocumentVersion>
        <MerchantIdentifier>A2UAUVMGTII0KR</MerchantIdentifier>
    </Header>
    <MessageType>Product</MessageType>
    <Message>
        <MessageID>1</MessageID>
        <OperationType>Update</OperationType>
        <Product>
            <SKU>ABCDORD0005</SKU>
            <StandardProductID>
                <Type>ISBN</Type>
                <Value>9788478888566</Value>
            </StandardProductID>
            <LaunchDate>2014-03-23T00:00:00.000+01:00</LaunchDate>
            <ReleaseDate>2014-03-23T00:00:00.000+01:00</ReleaseDate>
            <Condition>
                <ConditionType>New</ConditionType>
            </Condition>
            <DescriptionData>
                <Title>Harry Potter and the Philosopher's Stone</Title>
                <Brand>brand_item</Brand>
                <Description>Harry Potter and the Philosopher's Stone is the first novel in the Harry Potter series, written by J. K. Rowling.</Description>
                <Manufacturer>J. K. Rowling</Manufacturer>
                <ItemType>sotto_categoria</ItemType>
            </DescriptionData>
            <ProductData>
                <Sports></Sports>
            </ProductData>
        </Product>
    </Message>
</AmazonEnvelope>