Question

I'm working with amazon mws feed api in java and I'm having some problem while sending a ProductImage feed to amazon.

This is the xml I'm sending:

<?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>

And this is the web service response (only the interesting part):

            <Result>
                <MessageID>1</MessageID>
                <ResultCode>Error</ResultCode>
                <ResultMessageCode>5000</ResultMessageCode>
                <ResultDescription>XML Parsing Error at Line 2, Column 15: Found unexpected element &apos;ProductImage&apos; while parsing the start of this &apos;AmazonEnvelope&apos; document. Children of this element will be ignored by the parser..</ResultDescription>
            </Result>

I don't understand why he ignores the ProductImage tag, I'm following an example in the documentation and it should be fine. I'm sending the feed with request.setFeedType("_POST_PRODUCT_IMAGE_DATA_"); Is it because I'm missing the Envelope part? I thought the java API did that, I had no problem with other feeds (even tough the product doesn't show in the sellecentral inventory).

This was my POST_PRODUCT_DATA feed (the fist that I should be sending, not the one above) that returned with no errors:

<?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>

I hope someone can help.

Was it helpful?

Solution 2

The problem was that I was missing the amazon-envelope part, here is an example of the correct xml I now send to the webservice:

<?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>

And this works just fine, got no returning errors, just note that it takes almost 1 minute for the product to shop up in the seller central, and 10 more minutes for it to be processed and become active. Also, the element StandardProductID is really important, if you don't provide the correct code you will get a missing key error in return.

OTHER TIPS

This sounds like you're sending your image feed using the _POST_PRODUCT_DATA_ SubmitFeed consant.

Instead, you need to send your images using the _POST_PRODUCT_IMAGE_DATA_ constant. There is a description of the workflow here. Look at the Selling on Amazon, Guide to XML for details on the feed's required contents. It features an example feed on pages 47/48.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top