Adding XML Declaration - WSO2
The XML declaration is a processing instruction that identifies the document is in XML format. While working on one of the integration scenarios, I noticed that WSO2 is not sending the XML declaration in the response or backend request message as expected. However, I was able to see it in the log messages. To overcome this issue, you can set below the AXIS2 property before sending a message out. To Add XML declaration: <property name="WRITE_XML_DECLARATION" scope="axis2" value="true"/> Also you can use below additional properties to set custom encoding type and set values for standalone. <property name=XML_DECLARATION_ENCODING" scope="axis2" value="UTF-16"/> <property name="XML_DECLARATION_STANDALONE" scope="axis2" value="no"/>