Skip to Content

Mapping error:Content is not allowed in prolog.

Apr 06, 2017 at 10:50 AM


avatar image
Former Member

Hi All,

I am trying to read XML through groovy script , while reading XML getting error:

Content is not allowed in prolog.

Any idea how to resolve this error.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Morten Wittrock
Apr 06, 2017 at 12:55 PM

Hi Aditya

Check that you don't have e.g. whitespace before the XML prolog (i.e. the <?xml ... ?> bit). Also, there might be an issue with the UTF-8 Byte Order Mark (BOM). You might - for testing purposes - want to place a Content Modifier step immediately before your script step, in order to set an XML body that you know to be correct.

If you are able to show the code and the payload, that would be helpful as well.



Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Morten,

Thanks For Reply, Now issue is resolved . Actually I was storing XML in property and that property i was using in Custom Function.

While defining property i didn't gave Data Type, After giving data type in property as java.lang.String it is working.