title: PHP Amazon MWS Feed - ProductImage - XML error on line -1
body: <p>I'm working on a custom module to send some products to amazon via PHP Amazon MWS.
  I read all the guides and the module is up and running now (sending all the feeds: Product, ProductImage, Inventory, Price) but I have a <strong>problem sending the image</strong>.</p>
  
  <p>The strangest thing (and this is where I got stuck and I'm thinking of throwing myself out of this 3rd floor office) is that testing my XML ProductImage FEED on Amazon Scratchpad it works!!
  (<a href="https://mws.amazonservices.it/scratchpad/index.html" rel="nofollow noreferrer">https://mws.amazonservices.it/scratchpad/index.html</a>)</p>
  
  <p>But if I take exactly same XML feed it fails with a strange error from Amazon WS (syntax error invalid char at line -1, you know).</p>
  
  <p>I'm sure my module works well because it simply take a product from a queue, generate the XML feed needed, and send it with the same function amazon wrote in its documentation example. (infact I sent 5000 products with success, except for the images)</p>
  
  <p>I read another answer pretty near, but the solution was to remove the "xml version="1.0" part, but I really don't think that's the problem. (Because the ScratchPad tool send it correctly with a positive submission feed result).</p>
  
  <p>This is a XML Image Feed as example:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd"&gt;
  &lt;Header&gt;
      &lt;DocumentVersion&gt;1.01&lt;/DocumentVersion&gt;
      &lt;MerchantIdentifier&gt;A1VWJ2240S9NYA&lt;/MerchantIdentifier&gt;
  &lt;/Header&gt;
  &lt;MessageType&gt;ProductImage&lt;/MessageType&gt;
  &lt;PurgeAndReplace&gt;false&lt;/PurgeAndReplace&gt;
  &lt;Message&gt;
     &lt;MessageID&gt;1&lt;/MessageID&gt;
     &lt;OperationType&gt;Update&lt;/OperationType&gt;
     &lt;ProductImage&gt;
         &lt;SKU&gt;0582&lt;/SKU&gt;
         &lt;ImageType&gt;Main&lt;/ImageType&gt;
         &lt;ImageLocation&gt;http://www.mywebsite.com/images/product/myimage.jpg&lt;/ImageLocation&gt;
     &lt;/ProductImage&gt;
  &lt;/Message&gt;
  &lt;/AmazonEnvelope&gt;
  </code></pre>
  
  <p>Can somebody help me with this?
  Any suggest or comment is valued.</p>
  
  <p>Thank you</p>