You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Robinson Duffy <rd...@fatwallet.com> on 2015/01/05 22:25:26 UTC

Does Camel REST DSL work with a Restlet Servlet?

Here's the stack overflow to my question, but I thought I would try here as
well:
http://stackoverflow.com/questions/27787435/does-camel-rest-dsl-work-with-a-restlet-servlet
<http://stackoverflow.com/questions/27787435/does-camel-rest-dsl-work-with-a-restlet-servlet>  

I'm trying out the REST DSL in 2.14.1 and I'm not able to get it to work
with restlet within a servlet container.  I was hoping to use the servlet
container for my restlet endpoints the way I do when I implement restlet
without the new REST DSL.  

Is this possible?  I'm beginning to suspect that the REST DSL is
incompatible with Restlet within a servlet container. I want the hosting
servlet container to handle the incoming requests, I don't want to have to
spawn a separate restlet server process (on a new port) for my camel
contexts.




--
View this message in context: http://camel.465427.n5.nabble.com/Does-Camel-REST-DSL-work-with-a-Restlet-Servlet-tp5761346.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Does Camel REST DSL work with a Restlet Servlet?

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Willem just implemented an improvement for this so it should work
better in the next release.

On Tue, Jan 6, 2015 at 5:06 PM, Robinson Duffy <rd...@fatwallet.com> wrote:
> I've found sort of a workaround for this…not sure if it is the best solution.
>
> I created a new class that implements the RestConsumerFactory and in the
> createConsumer method I have it create a restlet endpoint without the host
> or port.  Basically a route with <from uri="restlet:/hello?restMethod=GET"/>
>
> This is the same endpoint uri structure I was using before with my servlet
> container.
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Does-Camel-REST-DSL-work-with-a-Restlet-Servlet-tp5761346p5761393.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Re: Does Camel REST DSL work with a Restlet Servlet?

Posted by Robinson Duffy <rd...@fatwallet.com>.
I've found sort of a workaround for this…not sure if it is the best solution.

I created a new class that implements the RestConsumerFactory and in the
createConsumer method I have it create a restlet endpoint without the host
or port.  Basically a route with <from uri="restlet:/hello?restMethod=GET"/> 

This is the same endpoint uri structure I was using before with my servlet
container.  





--
View this message in context: http://camel.465427.n5.nabble.com/Does-Camel-REST-DSL-work-with-a-Restlet-Servlet-tp5761346p5761393.html
Sent from the Camel - Users mailing list archive at Nabble.com.