cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping error: Content is not allowed in prolog

AntonioSanz
Active Participant
0 Kudos

Hi all,

     I've got a file (custom XML file) to IDOC scenario.

     I am reading the xml file using a file adapter and when I try to do the mapping I get this error:

     "Content is not allowed in prolog"

     I have checked my xml file and it seems to be ok, but if I check the xml file in the file adapter I've got:

<?xml version="1.0" encoding="utf-8"?>

<ShippingOrder>

<Header>

<DeliveryNumber>80410647</DeliveryNumber>

<ConsigneeRefNo>83618</ConsigneeRefNo>

<RequestedDate>20120619</RequestedDate>

<ConsigneeCode>106976.....

.....

.......

My error is due to "" characters at the beginning of the xml file. But I have open the original xml file with notepad++ and I can not see that strange characters.

Is the file adapter adding this characters?¿?¿

Any idea to solve my problem?

Thanks.


Accepted Solutions (1)

Accepted Solutions (1)

former_member184681
Active Contributor
0 Kudos

Hi Antonio,

What you can see in the payload is called "Byte Order Mark", see more in Wiki here:

http://en.wikipedia.org/wiki/Byte_order_mark

I think normally these characters should be ignored by PI.

Are you manipulating the encoding in your sender File adapter? Can you try switching it from Text mode to Byte or the opposite, and see what happens?

Regards,

Greg

AntonioSanz
Active Participant
0 Kudos

Many thanks to all. I have fixed it:

I have just read the link which has been provided by Grzegorz and I have configured the Communication channel in tab "Processing" and I have set File Type as Text and in Encoding UTF-8

Now it works fine.

Answers (1)

Answers (1)

AntonioSanz
Active Participant
0 Kudos

I have also tried to use Schema validation in Sender agreement. Now I get the same error, but in sender adapter.

But I have open in notepad++ and I can not see that strange characters

aashish_sinha
Active Contributor
0 Kudos

Hi,

Please try to open XML file in your browser (IE) and see if you are able to open it. If you are not able to open then your xml file is not valid. Lets give it a try and see.

Regards

Aashish SInha