Camel - which pattern to use in order to complete xml with values from other services -
Camel - which pattern to use in order to complete xml with values from other services -
i have xml similar next has element composed url. url webservice contains xml. need completing xml info webservice, , accomplish camel. here goes example:
initial xml
<root> <level11>level1.txt</level1> <level12> <level21>http://someservice/11</level21> <level21>http://someservice/12</level21> </level12> <level13> <level22>http://someservice/21</level22> <level22>http://someservice/22</level22> </level13> </root>
http://someservice
returning xml have replace original xml. example
http://someservice/11
returns
<someservice> <test>11</test> </someservice>
http://someservice/12
returns
<someservice> <test>12</test> </someservice>
http://someservice/21
returns
<someservice> <test>21</test> </someservice>
http://someservice/22
returns
<someservice> <test>22</test> </someservice>
my final xml be:
<root> <level11>level1.txt</level1> <level12> <level21> <someservice> <test>11</test> </someservice> </level21> <level21> <someservice> <test>12</test> </someservice> </level21> </level12> <level13> <level22> <someservice> <test>21</test> </someservice> </level22> <level22> <someservice> <test>22</test> </someservice> </level22> </level13> </root>
so question best pattern should utilize accomplish result?
this seems fit content enrichment eip. eip allow append , expand original message based on output of other services. see more @ apache camel site reading content enrichment eip documentation.
apache-camel integration-patterns
Comments
Post a Comment