You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by csepari <pa...@oracle.com> on 2015/03/27 11:43:51 UTC

Hit URL1 or URL2 based on xml data using Apache Camel

Can you help me with minimum code to automate the following usecase:-

User will hit camel application URL

Camel will process the xml request and based one some specific tag value it
will hit other application URL 1 or URL2

URL1 and URL2 will also respond with xml, Camel should be able to get that
request and send it back

EXPECTATION:
Camel code should be mostly controllable through camelContext.xml may be
using XQuery/XPATH/OGNL/RegEX plugin.
Please share code/ example/explanation.





--
View this message in context: http://camel.465427.n5.nabble.com/Hit-URL1-or-URL2-based-on-xml-data-using-Apache-Camel-tp5764897.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Hit URL1 or URL2 based on xml data using Apache Camel

Posted by csepari <pa...@oracle.com>.
I am still unable to visualize.
Can you suggest some more reading or content or actual minimum code to rout
URL(HTTP) to other URL(HTTP)

Example Usecase is :
a>
URL-Input is : http://localhost:8080/app?a=1,b=t1
should get routed to http://t1:8080?a=1

b>
URL-Input is : http://localhost:8080/app?a=1,b=t2
should get routed to http://t2:8080?a=1







--
View this message in context: http://camel.465427.n5.nabble.com/Hit-URL1-or-URL2-based-on-xml-data-using-Apache-Camel-tp5764897p5765016.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Hit URL1 or URL2 based on xml data using Apache Camel

Posted by yogu13 <yo...@gmail.com>.
A good Content Based router example can be seen here[1]. From the example you
would understand usage of XPATH with CBR, However i am not aware of any
tailor made examples for your request.

Various examples on Servlet/Rest/HTTP are available in the examples folder
within the source.


[1] http://camel.apache.org/load-balance-for-existing-messaging-service.html

Regards,
-Yogesh



--
View this message in context: http://camel.465427.n5.nabble.com/Hit-URL1-or-URL2-based-on-xml-data-using-Apache-Camel-tp5764897p5764907.html
Sent from the Camel - Users mailing list archive at Nabble.com.