apache camel - Reuse consumer to fetch extra content from the same endpoint -
i have apache camel route purpose fetch xml-documents , files linked in document.
<route id="route-ftp"> <from uri="ftp://foo@server:21/data?password=xxx&include=.*.xml"/> <to uri="mybean"/> </route> when reaches mybean want parse file , use same ftp settings fetch files listed in xml-file. or perhaps fetch them @ same time using xpath.
<root> <article> <headline>headline</headline> <image src="images/cat.jpg"/> </article> </root> the filenames taken above xml image tag , src attribute.
i want deliver original file images in package.
i can't find right approach problem.
i way.
depending on how file structured, consume have done. split body per row (assuming each row contains filename). split done using splitter eip. each body contains file name.
i use camel's dynamicto enrich route file using ftp parameters. can save ftp parameters properties same.
in way, fetch list, iterate on list , fetch file every row in list.
Comments
Post a Comment