1

This simple code in MWS Scratchpad gives me this 50001 error "The XML you submitted is ill-formed at the Amazon Envelope XML level at (or near) line 2, column 14."

<?xml version="1.0" encoding="utf-8"?>
<messagetype>OrderFulfillment</messagetype>
<message>
 <messageid>1</messageid>
 <orderfulfillment>
      <amazonorderid>171-0326363-1826719</amazonorderid>
      <carriername>La Poste</carriername>
      <shippertrackingnumber>1K03004689202</shippertrackingnumber>
 </orderfulfillment>
</message>
hedgehog
  • 11
  • 1

2 Answers2

1

Are you missing the AmazonEnvelope?

<AmazonEnvelope xsi:noNamespaceSchemaLocation="amzn-envelope.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Header>
        <DocumentVersion>1.02</DocumentVersion>
        <MerchantIdentifier>XXXXXXXXXXXX</MerchantIdentifier>
    </Header>

<MessageType.....

</AmazonEnvelope>

https://docs.developer.amazonservices.com/en_US/feeds/Feeds_SubmitFeed.html

ScottG
  • 10,711
  • 25
  • 82
  • 111
0

Most probably because there is no root element. All XML must be enclosed into a single element-node, that is the root. For XHTML this is <html>. But, since I do not know the conventions of amazon-mws scratchpad, this is all I can guess. You would need something like:

<?xml version="1.0" encoding="utf-8"?>
<some-outer-element>
   <messagetype>OrderFulfillment</messagetype>
   <message>
      ...
   </message>
</some-outer-element>

where <some-outer-element> would need to be the valid root-element for the document type you are using. Which one that is should be in the documentation for Amazon MWS (Scratchpad) or the XML schema definition of the XML you are using.

amix
  • 133
  • 1
  • 12