KB Article #176926
XML with DOCTYPE declaration fails to be sent via Web Services protocol
Problem
-- A XML message fails to be sent out via Web Services protocol
-- Error message is:
Error packaging Message
org.apache.axis2.AxisFault: Error in extracting message properties
-- The payload contains a DOCTYPE declaration
Resolution
** Per default a Web Services payload is being sent in the SOAP body
** If payload is part of the SOAP body, it will be integrated into the SOAP message.
** DOCTYPE declaration cannot be preserved as part of the SOAP body and SOAP recommendation actually forbids the usage of DOCTYPE:
SOAP Version 1.2 Part 1: Messaging Framework
"The XML infoset of a SOAP message MUST NOT contain a document type declaration information item".
To solve the issue, the payload must be sent as an attachment. This can be changed on a per partner basis:
- In the UI, go to Trading Configuration -> Show collaboration settings
- Select the community -> partner on the left side (if partner is missing, use "Specialize collaboration settings for a partner" to add partner)
- Enable "Set sending rules for the Web services message protocol"
- For the "Payload location:" select "Attachment"
- Save