I am hoping to pass the encoding dynamically to a file component. Basically I
need to store an error record in a file with the same encoding as the
inputfile (encoding is changed during processing). The original encoding is
stored in a header called inputFileEncoding here what i have tried:
1)
.recipientList(simple("file://" + outputDirectory + File.separator+
"?fileExist=Append&charset=$(header.inputFileEncoding)"));
2)
.toD("file://" + outputDirectory + File.separator +
"?fileExist=Append&charset=$(header.inputFileEncoding)");
The problem is the file is not created. no exception i thrown. It does works
when i hardcode the encoding like charset="UTF8"
a workaround has been to do:
exchange.setProperty(Exchange.CHARSET_NAME,inputFileEncoding) which seems to
work.
Is it not possible to set the encoding dynamically in the endpoint URI?
--
View this message in context:
http://camel.465427.n5.nabble.com/dynamic-endpoint-with-dynamic-encoding-tp5790768.html
Sent from the Camel - Users mailing list archive at Nabble.com.