camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: RestFul service using camel
Date Fri, 01 Feb 2013 07:35:59 GMT
On Thu, Jan 31, 2013 at 7:04 PM, Richa <> wrote:
> Hi,
> I want to invoke a rest service using apache camel. Currently i am using the
> cxfrs component to configure my endpoint. My route looks like below:
> from("cxfrs://http://localhost:8080/RestServiceApp/?resourceClasses="com.sample.Server.HelloWorld").log("Route
> Started");
> My problem is that i want to invoke a method present in the server class
> (HelloWorld in my case). Can you please tell me how do i call a particular
> method?

When you use from, then you let Camel expose a REST service. You want
the opposite, to call a REST service on a remote server.
So for that you need to use .to instead.

So you need to consider when to invoke this REST service, what
triggers that call?

You can use a timer to call it at every X period

from timer
  to cxfrs

Or you can also just invoke it from java code using a ProducerTemplate

> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Red Hat, Inc.
FuseSource is now part of Red Hat
Twitter: davsclaus
Author of Camel in Action:

View raw message