Hello Mates, Good Day!
I have a requirement to process the XLSX files. i have written a camel dsl
to get the files from a directory and send them to a processor.
But i am getting a file not found exception in my pojo class (processExcel
method) as the exchange is not sending the xlsx file as object it seems.
here is the code:
Myroute class:
from(file:data/inboundFiles)
.beanRef("myProcessor","process")
.to(file:data/processedFiles)
.end();
Myprocessor class:
public void process(Exchange exchange) throws Exception {
if(exchange != null)
{ Object body = exchange.getIn().getBody(); // looks like there
is
an issue here.
MyObject obj = myPojo.processExcel(body.toString(), passCode); //
passCode is the password for the xlsx file to access.
}
Note: if i hard code the file name and run myPojo.processExcel function as
simple java application it works. looks like password protected xlsx file
not getting through in camel exchange. exchange.getIn().getBody(); i
suspect the issue is here.
Could some one let me know your views please?
Also note that i have a written a POI API to access and process the excel
file by passing the passcode in myPojo.processExcel function and which
works absolutely fine.
--
View this message in context:
http://servicemix.396122.n5.nabble.com/Exchange-not-reading-password-protected-XLSX-files-in-Fuse-ESB-tp5717550.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.