Hi,
yogu13 wrote
> would you have any test case which can be used to reproduce it?
I wrote a simple unit test for the given scenario. The expected outcome is
"ABC" as the first csv field in the output file. I'm using Camel 2.15.0 and
Java 8.
import java.nio.file.Files;
import java.nio.file.Path
I have a requirement to send files as email attachments.
a simple route for this would be
from("file:///path/to/file.xyz")
to("smtp://mail-details...")
The behaviour for this is to use the message body (i.e. the file) as the
email contents, so that's not quite right. I want the file to be an e
I *think* I understand what you are saying - however does that not equate to
a mapping file?
I was hoping that castor would function without a mapping file and create a
default class structure, for example based on the element/attribute names in
the XML document.
I am a complete castor newb, so
I decided to RTFM - looks like your answer is spot on:
http://castor.codehaus.org/1.2/xml-mapping.html#2.2-Unmarshalling-Behavior
> When Castor finds an element while unmarshalling a document, it will try
> to use the mapping information to determine which object to instantiate.
> If no mapping
Try the below code
from("file:///path/to/file.xyz")
.process(new Processor(){
@Override
public void process(Exchange exchange){
Message in = exchange.getIn();
byte[] file = in.getBody(byte[].class);
String fileId = in.getHeader("CamelFileName",String.class);
in.addAttachment(fil
Thanks for the code, but that isn't what I'm after.
It's simple to do with code, but I'd like this to be a one liner, and also
possible from routes written in xml.
So I'm looking to see if others think a ready made processor in the
camel-mail module would be useful, and
what the best way of callin
Hello !
Thank you for the test case... I am assuming you are using camel-csv
component here
In that case couple of things i noticed would require a change:-
1. Use org.apache.camel.dataformat.csv.CsvDataFormat (This has its own
DataFormat defined as well)
2. The Dataformat would be set as below
Hello,
You could try enabling the logs for camel and check how the flow progresses.
and post back if any issue
Regards,
-Yogesh
--
View this message in context:
http://camel.465427.n5.nabble.com/doTry-doCatch-does-not-work-for-bean-in-the-Camel-Spring-DSL-tp5765549p5765675.html
Sent from the