Amazon Services
Amazon Marketplace Web Service (Amazon MWS) Documentation
Amazon MWS Documentation

Example Client Side errors

This section shows some common Amazon MWS client side error examples and possible solutions to the problem.

User-agent error

Reason

The User-Agent header sent with the request was not in a valid format.

How to troubleshoot

Build the User-Agent header using code from the Amazon MWS client library or see the documentation for an acceptable format for the User-Agent header.

Show example code Hide example code

<ErrorResponse xmlns="http://mws.amazonservices.com/doc/2009-01-01/">
  <Error>
    <Type>Sender</Type>
    <Code>UserAgentHeaderMalformed</Code>
    <Message>
      Problem with required MWS User-Agent header
      (e.g. "MyAppName/build123 (Language=Java/1.2)"):
      Encountered "<EOF>" at column 116.
      Was expecting: "=" ...
    </Message>
    <Detail/>
  </Error>
  <RequestID>
    21f197f6-24b7-4b7b-94fc-55fa34056d34
  </RequestID>
</ErrorResponse>

↑ Top

SSL exception error

Reason

The client tried to communicate with the Amazon MWS endpoint, but it could not verify our SSL certificate or it could not find the certificate store on the client machine to use for verification.

How to troubleshoot

If you get this exception, you need to add Amazon MWS certificates to your client trust store. Consult the Java documentation regarding setting up and configuring Trust Stores in Java.

Show example code Hide example code

javax.net.ssl.SSLException: java.lang.RuntimeException:
Unexpected error: java.security.
InvalidAlgorithmParameterException: the trustAnchors
parameter must be non-empty

↑ Top

MD5 error

Error message

Show example code Hide example code

The Content-MD5 HTTP header you passed for your feed
(1B2M2Y8AsgTpgAmY7PhCfg==) did not match the Content-MD5 we
calculated for your feed (3cldK7kqMxK6orwvXXdzSQ==)
            

Reason

The Content-MD5 value 1B2M2Y8AsgTpgAmY7PhCfg== corresponds to the empty string. The MD5 provider instance used to calculate the Content-MD5 is not able to read any bytes from the stream.

How to troubleshoot

A possible solution is to export the document as a string and construct the MemoryStream with this string's bytes.

Show example code Hide example code

MemoryStream stream =
  new MemoryStream(
    new UTF8Encoding()
      .GetBytes(
        xmlDocument.ToString()));
request.ContentMD5 =
  MarketplaceWebServiceClient
    .CalculateContentMD5(stream);
            

↑ Top