Rest assured you're in the right place, Camel is exactly what you need! By
POST i'm going to assume your service is a HTTP server of some kind?

By way of a simple example if the service is a simple http server expecting
json, it might be as easy as defining a route as follows

public class SimpleJsonHttpRoute extends RouteBuilder
{
   public void configure() throws Exception
   {
       from("direct:simple-http-send").marshal().json().to("
http://myserver:8080/service";);
   }
}

You would use a producer template to send the hibernate pojo to the simple
service endpoint

ProducerTemplate template = camelContext.createProducerTemplate();
MyPojo entity = dao.loadPojo(id);
template.sendBody("direct:simple-http-send", entity);

This would cause camel to convert the entity to a JSON string using XStream
and use this as the content for a http request to the service at
http://myserver:8080/service.

I've left out a few details here, but as Claus mentions (below), there are
tons of examples and documentation to help you pick exactly what you need.
If you have any questions then ping the list and someone will be happy to
help.

rgds,

ste

from an earlier mail by Claus...
Of course there is the camel documentation at
http://camel.apache.org/

And the tutorials
http://camel.apache.org/tutorials.html

And examples
http://camel.apache.org/examples.html

And some blogs, articles on other sites at
http://camel.apache.org/articles.html

And this thesis on Camel, although a bit old
http://elib.uni-stuttgart.de/opus/volltexte/2008/3520/pdf/STUD_2127.pdf

And then there is a book in the works (I am one of the authors)
http://www.manning.com/ibsen

And FUSE also have some additional documentation
http://fusesource.com/products/enterprise-camel/#documentation

On Tue, Dec 22, 2009 at 4:16 PM, user09772 <sonnyh...@gmail.com> wrote:
>
> Hey,
>
> A oracle table is enqueuing ids to an activemq.  i Have a service as the
> consumer of the queue, which dequeues ids from the queue and does a
database
> lookup based on that id, and eventually gets a POJO (from hibernate).  I
> need a way to send this pojo to another service.  Can Camel do this for
me?
> I've not used camel before.  If not, what is the best way to send a post
to
> another service in this scenario.
>
> Thanks.
> --
> View this message in context:
http://old.nabble.com/ActiveMQ---Camel-as-client-POST--tp26896366p26896366.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>

Reply via email to