You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Claire <cl...@newgens.com.sg> on 2013/12/12 08:35:41 UTC

Reading file using camel

Hi,

I have two files to convert from csv file to xml file and I also have
another file (properties or excel file) to lookup. So I would like to read
value from that excel file and convert my csv to xml file based on those
values. I did one java to read those value from that lookup table file but I
can't specify the file path location in my bean. Following is the way I
injected java in my bean.

*
<bean id="filePath" class="com.beans.readFile">
<property name="location">
 <value>"D://workspace//data//sample_cfg.cfg"</value>       
 </property>
 </bean> *  

Following is my java to return filePath.

*public String readFile(String fPath){
return fPath;
}*

but I got error for calling like that. How can I achieve this approach?



--
View this message in context: http://camel.465427.n5.nabble.com/Reading-file-using-camel-tp5744653.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Reading file using camel

Posted by Claire <cm...@gmail.com>.
Hi, Sorry, it was my mistake for syntax error :(

Thank you anyway =D



--
View this message in context: http://camel.465427.n5.nabble.com/Reading-file-using-camel-tp5744653p5744721.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Reading file using camel

Posted by Willem Jiang <wi...@gmail.com>.
What’s your com.beans.readFile look like?
How do you inject it into the camel route?

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) (English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 12, 2013 at 3:36:19 PM, Claire (claire.chanmyae@newgens.com.sg) wrote:
>  
> Hi,
>  
> I have two files to convert from csv file to xml file and I also have  
> another file (properties or excel file) to lookup. So I would  
> like to read
> value from that excel file and convert my csv to xml file based  
> on those
> values. I did one java to read those value from that lookup table  
> file but I
> can't specify the file path location in my bean. Following is  
> the way I
> injected java in my bean.
>  
> *
>  
>  
> "D://workspace//data//sample_cfg.cfg"  
>  
> *
>  
> Following is my java to return filePath.
>  
> *public String readFile(String fPath){
> return fPath;
> }*
>  
> but I got error for calling like that. How can I achieve this approach?  
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/Reading-file-using-camel-tp5744653.html  
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>