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&amp;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.

  1. 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.

  2. 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

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -