I have an interesting integration problem: One of our business units drops report files in a directory. Each report is a PDF, and has an associated text metadata file that describes the report.
I'd like to have Camel poll the directory for the metadata files, and then, upon reading the metadata file, load the associated report. The end result would be that * the report would be moved to its appropriate location * the metadata would be stored in a database * the metadata file would be deleted. I thought about using the file component to match the metadata files; for each metadata file, unmarshal the data, and store that data into a header. Then use pollEnrich to attempt to load the associated report. Once that's loaded, move it to its final location. The questions I have are: 1. How does one store the body as an object using the Spring/Blueprint specification? I know there's the <setHeader> specification, but I'm not sure just using <simple>${body}</simple> is going to work the way I expect for an object (i.e. not a string). 2. Is this the best way to do this? Something tells me I'm trying to fit a square peg into a round hole here... --sgp