Converting FlatFile into XML in Sonic ESB

Posted by Admin on 13-Oct-2010 07:06

Hi,

Greetings for the day,

I am new to the Sonic ESB tool. As part of my induction programme, I am trying to explore the features of Sonic.

I am trying out a POC, where a Flat File (Fixed Format) needs to be picked from a input destination folder and convert the same into xml within sonic and then insert the data required into a DataBase Table.

Here are the flow of events as part of POC:

1) Pick up a Flat File from an specified folder location using File Pick Up service

2) Convert the FlatFile into standard XML using the Transformation service feature.

3) Insert the data from the XML into a table in DataBase using the Sonic DataBase service by creating a DataBaseOperation.

The Flat File structure is as below-- Header, Records(Detials) and Trailer:

----------------------------------------------------

Header = filename.*  <dd-mm-yyy>

Record detail1

Record detail2

Trailer Record Count =2

---------------------------------------------------------

Need to convert this into the below XML format:

--------------------------------------------------------------------------

<File>

     <Header>header info</Header>

     <Records>

          <Record>Record detail1</Record>

          <Record>Record detail2</Record>

     </Records>

     <Trailer>Trailer info</Trailer>

</File>

------------------------------------------------------------------------

So, in this process I am able to complete the step 1 and 3 successfully and were able  tested individually. But I am not able convert the FlatFile into an XML mentioned step 2.

Kindly shed some light on completing the step 2.

Any other approach suggestions to complete the POC are welcome.

Thanks in adance.

Naresh.

All Replies

This thread is closed