If you want the service implementation to be called and route the message to 
Camel route , you need to take a look at the ProduceTemplate[1], which could 
act as a client of Camel route.

[1]https://camel.apache.org/producertemplate.html

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On April 4, 2014 at 1:03:19 AM, Sergey Beryozkin (sberyoz...@gmail.com) wrote:
> This is specific to CXFRS server, it only acts as a matcher, and then
> sets various matched values on the Camel exchange.
>  
> I guess you may want to use cxfrs bean...
>  
> Also feel free to experiment with Camel restlet/http/jetty, etc.
>  
> Re CXF: you can have native CXF JAX-RS server endpoint containing an
> implementation class used inside Camel and get it invoked via Camel
> transport.
>  
> Sergey
>  
> On 03/04/14 17:47, vrahul wrote:
> > Hi,
> >
> > I am confused with the behaviour of cxf rest web service with camel route
> > file. I have noticed the control never go inside the implementing class of
> > the rest service interface.
> >
> > Following are the steps how i am writing the web service using cxf jaxrs and
> > camel
> >
> > 1. i have create a interface.
> > @Path("/licence")
> > public interface LicenceThresholdService {
> > @POST
> > @Consumes({MediaType.APPLICATION_JSON})
> > @Path("/userThresholdBreached")
> > Boolean isUsersThresholdBreached(User user);
> > }
> >
> > 2. Implementation class
> > public class LicenceThresholdServiceImpl implements
> > LicenceThresholdService {
> > @Override
> > public Boolean isUsersThresholdBreached(final OEMUser user) {
> > System.out.println("inside threshold breched method");
> > return Boolean.FALSE;
> > }
> > }
> >
> > 3. Create the cxf jaxrs server
> >
> > > > xmlns:cxf="http://camel.apache.org/schema/cxf";
> > ...
> > xsi:schemaLocation="
> > http://camel.apache.org/schema/cxf
> > http://camel.apache.org/schema/cxf/camel-cxf.xsd
> > ...">
> >
> > > > address="http://{{service.host}}:{{service.port}}/userProfile";
> > serviceClass="com.jato.esb.service.licence.LicenceThresholdServiceImpl"  
> > loggingFeatureEnabled="true">
> >  
> >  
> >  
> >  
> >  
> >
> > 4. injected the cxf rsServer bean in camel route endpoint
> >  
> >
> > Now my problem is whenever i call this service, control never went inside
> > isUsersThresholdBreached method of LicenceThresholdServiceImpl class.
> > Because of this i am not able to fully leverage the cxf rest services.
> > I have tried the cxf rest service with Mule esb and Spring application file,
> > i have noticed that control always went inside the implementation class
> > also, but this is not the case with camel route.
> > Please help me out for this issue, this is a serious concern for us to go
> > with camel.
> >
> >
> >
> > --
> > View this message in context: 
> > http://camel.465427.n5.nabble.com/Camel-CXF-Jaxrs-service-implementation-class-s-methods-are-not-executing-tp5749733.html
> >   
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
>  
>  
> --
> Sergey Beryozkin
>  
> Talend Community Coders
> http://coders.talend.com/
>  
> Blog: http://sberyozkin.blogspot.com
>  

Reply via email to