Boomi: Create XML or JSON document through Message shape

Creating a JSON object in the message shape like this

Here it is important to that the message starts with ‘ and ends with a ‘ (single quote)

Creating XML document

In JSON you need that the message starts with ‘ and ends with a ‘ (single quote), BUT this is not necessary for XML, but works too.

However here you should NOT have the <?xml> tag in front cause then Boomi is unable to parse it as an XML element.

<?xml version=”1.0″ encoding=”UTF-8″ standalone=”no”?>

including the xml tag is not working !!!

And if you do forget this is the error you can expect

The test run for fetch Materials from MARA (SAP) you are attempting completed with the following errors: Embedded message: Unable to create XML files from data, the document may not be well-formed xml ; Caused by: Illegal processing instruction target (“xml”); xml (case insensitive) is reserved by the specs. at [row,col {unknown-source}]: [2,5]

Using Special characters in XML…

So if you intend to have a special character like a single quote or similar then you need to XML encode them. Use a tool like https://coderstoolbox.net/string/#!encoding=xml&action=encode&charset=us_ascii

E.g. if you would like to have an xml that looks like this

MAKTL EQ ‘ABC123’

SAP query example where single quotes are used

Then that should be converted into

MAKTL EQ &#39;ABC123&#39;

This is how the encoded XML should look like

Leave a Reply

Your email address will not be published. Required fields are marked *