cancel
Showing results for 
Search instead for 
Did you mean: 

content conversion Vs Module (MessageTransformBean) - help?

Former Member
0 Kudos

Hi All,

Scenario- File Sender, reading file (header,data,*,trailer)

when should we use standard content conversion, Module (MessageTransformBean) ?

I need to generate complex XML structure from flat-file records.

Source (using some key value to identify header/data/trailer)

header

data-record

data-record

trailer

Target (nested structe - not sure how to do nested part using content conversion)

<message_mt>

<record>

<header>

<key>

<info>

<key1/>

<key2/>

</info>

</header>

<partner>

<parvw/>

<par1/>

</partner>

<line-ite>

.. details ..

</line-item>

</record>

<message_mt>

I looked at all the logs related to this, how-to docs as well, no where mentioned how to create nested structures, most of them are flat structure

Can anyone advise me how to do this and when should i use content coversion, module and why?

Appreciate any help.

Thanks

Message was edited by: kumar p

Message was edited by: kumar p

Accepted Solutions (0)

Answers (1)

Answers (1)

stefan_grube
Active Contributor
0 Kudos

The content conversion in file adapter and module 'MessageTransformBean' are similar. Therefore you use the module in file adapter only, when you want to write an adapter module which works on the plain text structure before the conversion. Mostly you use the 'MessageTransformBean' in other adapters like JMS- or Mail adapter, where no content conversion is possible by default.

The content conversion is not able to create a nested structure. You have to create a flat structure first, then create a nested structure with mapping.

Regards

Stefan

Former Member
0 Kudos

Thanks for your reply. Documentation for Record Structure says you can defind record structur with nested, but not seen how to do that ?

I got confused with MessageTransform Vs content conversion option for File/FTP sender adapter, as MessageTransform has similar options but more flexibility.

It appear to be very tough to debug if it got error during parsing the flat file data to xml structure.