-
1. Re: Calling RESTful web service from Camel Route
michal.warecki Jul 31, 2012 10:17 AM (in response to rmahajan)On http://camel.apache.org/cxfrs.html there is "How to invoke the REST service through camel-cxfrs producer" part.
-
2. Re: Calling RESTful web service from Camel Route
njiang Aug 9, 2012 9:39 PM (in response to rmahajan)You can also use camel-http or camel-http4 or camel-ahc to send the request to the RESTful web service at the same time.
Willem
-
3. Re: Calling RESTful web service from Camel Route
rmahajan Aug 10, 2012 9:29 AM (in response to njiang)Bylooking at cxfrs documentation, I am guessing that this cxfrs component is used for calling RESTful web service inside ESB. I am trying to call REST web service deployed on application server located on different box. Camel route in Fuse IDE has no knowledge of what Java class definition being used to create that RESTful web service. (that being the whole point of using web services).
So I started looking at HTTP component where I called REST web service successfully however I have not figured out yet how to pass parameters dynamically in the URL. For example if URL to call web service is http://remote-host:8080/Report/MyReport?id=123
I would like to know how I can pass this parameter 123 and not hardcode it.
Thanks
Ram
-
4. Re: Calling RESTful web service from Camel Route
njiang Aug 12, 2012 8:44 PM (in response to rmahajan)you can set the header of "CamelHttpQuery" or "CamelHttpURI" as you want dynamically before routing the message to the camel-http endpoint.
Willem
-
5. Re: Calling RESTful web service from Camel Route
rmahajan Aug 13, 2012 5:16 PM (in response to njiang)Hi
Can you please send me an example of CamelHttpQuery or CamelHttpURI ?
My RESTful web service is deployed on a separate Tomcat app server (totally separate than whatever is running in FUSE IDE). I can execute this REST service from Internet Explorer from URL like http://localhost:8080/Reports/myReport?id=123
I have been struggling to find a way to set the value of this parameter "id" dynamically on the fly as per incoming message content.
Thanks
RM
-
6. Re: Calling RESTful web service from Camel Route
davsclaus Aug 14, 2012 1:49 AM (in response to rmahajan)See this FAQ about dynamic to