Loading

Error 'Content is not allowed in prolog' in Outbound emails

Publish Date: May 1, 2026
Description

When a Salesforce Outbound Messaging notification fails to receive a correctly formatted SOAP acknowledgment from the target endpoint, the outbound message delivery fails with the following error:
"org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog."
This error is visible in the Delivery Failure Reason field on the Outbound Messaging Delivery Status page (Setup > Workflow & Approvals > Outbound Messages). It indicates that the target endpoint's response does not conform to the expected Salesforce SOAP response format.

Resolution

Salesforce will consider outbound messages delivered successfully only if the target endpoint returns the response in the below format.
 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<notificationsResponse xmlns="http://soap.sforce.com/2005/09/outbound">
<Ack>true</Ack>
</notificationsResponse>
</soapenv:Body>
</soapenv:Envelope>



The response must conform to the following format:

  • The response must be a SOAP envelope using the XML namespace: `<REDACTED>
  • The SOAP Body must contain a notificationsResponse element in the namespace `
  • The notificationsResponse element must contain an <Ack>true</Ack> element

If the response does not match this format — for example, if it contains plain text, HTML, or malformed XML before the SOAP envelope — the "Content is not allowed in prolog" error is returned. This commonly occurs when the endpoint returns an HTTP error page or redirects before the SOAP response body.
Related error: If the endpoint returns <Ack>false</Ack>, the Delivery Failure Reason will instead read: "SOAP response was a nack."


Steps to resolve:

  1. Review the target endpoint's response to verify it returns a valid SOAP envelope with <Ack>true</Ack>.
  2. Check for any HTTP redirect, authentication challenge, or error page returned before the SOAP body.
  3. Update the endpoint's response handling to return the correct SOAP acknowledgment format.
Additional Resources

Setting Up Outbound Messages

Knowledge Article Number

000381752

 
Loading
Salesforce Help | Article