camel-users mailing list archives

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

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">
<!-- -->
</jaxrs:server>

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:
https://issues.apache.org/jira/browse/CAMEL-7704

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="https://0.0.0.0:9089/rest">
>          <jaxrs:serviceBeans>
>              <ref component-id="rest"/>
>          </jaxrs:serviceBeans>
>      </jaxrs:server>
>      <bean id="rest" class="com.rest.RESTResource"/>
>      <bean id="restprocessor" class="com.rest.camel.RESTResourceProcessor"/>
>
>   <route id="restroute" streamCache="true" >
>              <from uri="jaxrs:server:rsServerSecure" />
>              <to uri="bean:restprocessor" />
>          </route>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/how-to-put-jaxrs-server-as-endpoint-in-route-from-tp5755249.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Mime
View raw message