Exposing rest service from camel application using existing http transport

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Exposing rest service from camel application using existing http transport

gilboy
Hi

I am looking at using the Rest component to define a Rest endpoint. My camel application gets packaged as a WAR file which I deploy in to my standalone tomcat instance.

I am not sure if I can bind this Rest endpoint to HTTP requests that arrive at the HTTP endpoint on my tomcat instance.

In the documentation it looks like I need to use another camel component like camel-jetty or camel-servlet to manage the REST transport. However, I don't want to do this as I already have a http endpoint available in my tomcat instance

Thanks
Joe
Reply | Threaded
Open this post in threaded view
|

Re: Exposing rest service from camel application using existing http transport

Claus Ibsen-2
You can use the servlet component with the rest-dsl.

There is already a tomcat example.
https://github.com/apache/camel/tree/master/examples/camel-example-swagger-java



On Mon, Feb 8, 2016 at 10:37 AM, gilboy <[hidden email]> wrote:

> Hi
>
> I am looking at using the Rest component to define a Rest endpoint. My camel
> application gets packaged as a WAR file which I deploy in to my standalone
> tomcat instance.
>
> I am not sure if I can bind this Rest endpoint to HTTP requests that arrive
> at the HTTP endpoint on my tomcat instance.
>
> In the documentation it looks like I need to use another camel component
> like camel-jetty or camel-servlet to manage the REST transport. However, I
> don't want to do this as I already have a http endpoint available in my
> tomcat instance
>
> Thanks
> Joe
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Exposing-rest-service-from-camel-application-using-existing-http-transport-tp5777361.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2