Re: POJO binding with the Rest DSL

2014-11-23 Thread Tim Dudgeon
Yes, I understand that, and got it working that way. I had misunderstood where the POJO binding fitted in. Thanks for your help. Tim On 22/11/2014 09:27, Claus Ibsen wrote: Hi The rest DSL is on the other side, eg on the server side, to exposes Camel routes as REST services. Not on the client

Re: POJO binding with the Rest DSL

2014-11-22 Thread Claus Ibsen
Hi The rest DSL is on the other side, eg on the server side, to exposes Camel routes as REST services. Not on the client side how to call another REST service. For POJO -> Json you can use jackson to turn that into json. On Fri, Nov 21, 2014 at 6:41 PM, Tim Dudgeon wrote: > OK, that figures, an

Re: POJO binding with the Rest DSL

2014-11-21 Thread Tim Dudgeon
OK, that figures, and I got it to work. But it seems to circumvent the whole purpose of the POJO binding with rest DSL. How are you supposed to send POJO to Rest DSL within Camel. I briefly tried using restlet like this: t.requestBody('restlet:http://$BASE_URL/foo?restletMethod=POST', p) but t

Re: POJO binding with the Rest DSL

2014-11-21 Thread Claus Ibsen
Hi Its the client code you write to send the Person using http4. It does not know how to convert that to json. You need to convert it to json first, and then send that instead of the Person java object. On Fri, Nov 21, 2014 at 5:56 PM, Tim Dudgeon wrote: > I'm having problems getting POJO bindin

POJO binding with the Rest DSL

2014-11-21 Thread Tim Dudgeon
I'm having problems getting POJO binding working with the Rest DSL. I put together a simple example in Groovy, but it fails: package com.im.examples.search import org.apache.camel.CamelContext import org.apache.camel.ProducerTemplate import org.apache.camel.builder.RouteBuilder import org.apac