Skip to Content

Now consider this scenario, the input flat file is in the following format.Vector[] vectorItem = new Vector ;

          

for(int intCounter =0; intCounter < arrayItemset.length; intCounter++) {

     StringTokenizer st = new StringTokenizer (arrayItemset[intCounter],”,”);

     vectorItem[intCounter] = new Vector(20);

               

     while (st.hasMoreTokens())

          vectorItem[intCounter].addElement (st.nextToken());

     vectorItem[intCounter].trimToSize();

}

          

for(int intVectorCounter = 0; intVectorCounter < vectorItem.length; intVectorCounter++ )

     for(int intCounter = 0; intCounter < vectorItem .capacity(); intCounter++)

          result.addValue((String) vectorItem .get(intCounter));               

Finally create the Interface Mapping also.

 

In the Configuration part, both the Sender and Receiver Communication
channels will use File adapter.

 

In the Sender Communication channel, we have to choose the
Message Protocol as File Content Conversion and also fill the Content
Conversion Parameters as shown in the following picture.

 

image

And also add the following columns in the Content Conversion Parameters. These columns are sufficient to do this conversion.

 

image

Then do the remaining Confiuration part for executing this scenario.

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

  1. Sravya Talanki
    You could have set the context of ITEMSET to CT_INPUT_MSG and used split by value and mapped to ITEM.That solves the problem and indeed simple way of doing it.
    (0) 
    1. Anonymous
      Hi,
      Interesting approach !!

      Even though doing the mapping using user defined functions looks intresting, like Sravya mentioned its much simpler to user split by value instead “No Brainer”

      Cheers,
      naveen

      (0) 

Leave a Reply