Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Using Apache camel File component

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am working on a simple example where i have file in source folder which contains a list of customer id's separated by a marker. I am passing this file through the camel router logic and passing it the bean class. In the bean class I am trying to extract the customer ids and then using those customer id's i am trying to dynamically generate a file with name as "Customers_<customerid>.txt". The problem I am facing is the file name i am taking is coming from header, i.e., "Customers" is coming from exchange header as "Customers.txt". This is the file that contains all the data.

Below I have provided the code
1. FileRouter.java


2. FileBean.java


But this code is not working as expected. Can any one please help where and what I am doing wrong.
as for the files they are contained in the "src/data" and the out put folder is src/outbox". My objective is to take the file available in src/data/Customer.txt and from the file extract all the customer id's and then dynamically create files and transfer it to src/outbox folder as "Customer_<customerid>.txt" file.

Please help
Thanks and Regards
Dilip H Pashupathi
 
Dilip H Pashupathi
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Is there any one who can help me with this problem.
Please it's very important.

Thanks and Regards
Dilip H Pashupathi
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic