camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <>
Subject Re: how to put jaxrs:server as endpoint in route from?
Date Fri, 15 Aug 2014 09:44:02 GMT

You if prefer to have a regular CXF jaxrs:endpoint reused directly then 
use a Camel transport, you'd have

<jaxrs:server  id="rsServerSecure" address="camel:/rest">
<!-- -->

and a route redirecting from a Camel Servlet redirecting to "camel:/rest".

The use of jaxrs:server in Camel routes is limited to accepting and 
returning a response, unless you are prepared to make the actual JAX-RS 
service implementation Camel aware - but in this case you'd be better 
off with using a cxfrs component.

I've opened a JIRA:

This is about shipping an out CXF interceptor that would allow a regular 
JAX-RS server response routed via the Camel route and feeding back to 
CXF JAXRSOutInterceptor. That would allow the same endpoints used in 
non-Camel routes reused as is in Camel routes, the deployment script 
would have to add a new interceptor to the 
jaxrs:server/jaxrs:outInterceptors. I've had this issue on my mind for a 
while, will take care of it asap

Cheers, Sergey

On 15/08/14 08:52, nono wrote:
>      Hey All,
> I have below jaxrs:server define like below. how to put it as endpoint into
> route?
> below is the code example, but it doest not work for me
> <jaxrs:server  id="rsServerSecure" address="">
>          <jaxrs:serviceBeans>
>              <ref component-id="rest"/>
>          </jaxrs:serviceBeans>
>      </jaxrs:server>
>      <bean id="rest" class=""/>
>      <bean id="restprocessor" class=""/>
>   <route id="restroute" streamCache="true" >
>              <from uri="jaxrs:server:rsServerSecure" />
>              <to uri="bean:restprocessor" />
>          </route>
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

View raw message