Skip to Content
avatar image
Former Member

Message Transformation Bean not converting csv to xml

Hello,

I have to transform CSV to xml in SFTP adapter. Although we can use content conversion but it was not working so i used Message Transformation Bean. File is getting picked up but i am getting error in mapping.. since the file is not getting converted to xml.

Error message : com.sap.aii.utilxi.misc.api.BaseRuntimeException; Content is not allowed in prolog.,

Attached are screen shots for module used, can somebody please tell me where am i making mistake? Do i have to add/remove any parameters ?

Regards

Ankyy

structure.png (9.6 kB)
mtb-1.png (17.8 kB)
mtb-2.png (20.9 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Jun 19, 2017 at 10:44 AM

    Hi Ankyy,

    Are you sure your XML is encoded in UTF-8? If yes, then please check if there are any characters before: <?xml

    Probably you have a problem with the BOM (byte order mark) - please check if there is a sequence of bytes: EF BB BF at the beginning of your XML file.

    Could you request a file without any additional characters at the beginning of your XML?

    Regards,

    Andrzej

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 19, 2017 at 04:23 PM

    Hi Ankiy,

    Please check below :

    But note MTB dose't has a option of Removing of RecordSet hence the XML converted by MTB dosne'nt match with your current structure you either need to change your source structure or you need to remove this Recordset via java/xslt before passing it to your mapping.

    Br,

    Manoj

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Manoj K

      mapping error.. since file is not getting converted to xml.

      Details: com.sap.aii.utilxi.misc.api.BaseRuntimeException; Content is not allowed in prolog., ApplicationRuntimeException: Runtime Exception when executing application mapping program

  • Jun 19, 2017 at 12:42 PM

    Hi Ankyy!

    Why did you set 'nl' as field separator when you have comma separated values in your source file?

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Ankyy!

      May be my understanding is wrong, but since you have recordset with occurence "*" in your source file you should use keys for correct processing. Or you should set definite count for each recordset.

      Regards, Evgeniy.

  • Jun 23, 2017 at 10:53 AM

    Hi Ankyy!

    You've missed the dot in parameter's name "Transform.Class".

    One more question: do you need your header record in further XML processing?

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 28, 2017 at 11:14 AM

    Hello All,

    I am closing this thread. Thank you for help.

    Regards

    Ankyy

    Add comment
    10|10000 characters needed characters exceeded