You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by vrahul <vr...@gmail.com> on 2014/09/09 14:32:22 UTC

Re: Camel CXF Jaxrs service implementation class's methods are not executing

This became a code quality concern for us. Can you please explain that why
cxf-rs server bean implementation behave is different with camel. is there
any way i can implement cxf-rs services the same way as it is. 



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-CXF-Jaxrs-service-implementation-class-s-methods-are-not-executing-tp5749733p5756246.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel CXF Jaxrs service implementation class's methods are not executing

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi,
a CXF RS Blueprint extension is available (resourceClass attribute) that 
can be used to have only the interface supporting the endpoint, I did 
not use it but Yuhan showed it to me and it looked very cool

Cheers, Sergey
On 29/09/14 08:15, vrahul wrote:
> Thanks Jiang,
> I understand why control should not go to service impl. But now my concern
> is why we need to write the impl class at all. As in below example I have
> create a web service called FeatureService, and in cxf:rsServer tag's
> serviceClass attribute we need to pass the above FeatureService's
> implementation.
>
> <cxf:rsServer id="featureServiceServer"
> 	
> address="http://{{esb.feature.service.host}}:{{esb.feature.service.port}}/featureService"
> 		serviceClass="com.test.esb.service.flm.FeatureServiceImpl"
> loggingSizeLimit="30" >
>        <cxf:providers>
>            <bean class="org.codehaus.jackson.jaxrs.JacksonJsonProvider"/>
>        </cxf:providers>	
> </cxf:rsServer>
>
> Where FeatureServiceImpl implements the FeatureSerivce(Rest service)
> interface. Is it possible to omit the need of FeatureServiceImpl when we use
> cxf with camel. Please share your thoughts on this.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-CXF-Jaxrs-service-implementation-class-s-methods-are-not-executing-tp5749733p5757174.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: Camel CXF Jaxrs service implementation class's methods are not executing

Posted by vrahul <vr...@gmail.com>.
Thanks Jiang,
I understand why control should not go to service impl. But now my concern
is why we need to write the impl class at all. As in below example I have
create a web service called FeatureService, and in cxf:rsServer tag's
serviceClass attribute we need to pass the above FeatureService's
implementation. 

<cxf:rsServer id="featureServiceServer"
	
address="http://{{esb.feature.service.host}}:{{esb.feature.service.port}}/featureService"
		serviceClass="com.test.esb.service.flm.FeatureServiceImpl"
loggingSizeLimit="30" >
      <cxf:providers>
          <bean class="org.codehaus.jackson.jaxrs.JacksonJsonProvider"/>   
      </cxf:providers>	
</cxf:rsServer>

Where FeatureServiceImpl implements the FeatureSerivce(Rest service)
interface. Is it possible to omit the need of FeatureServiceImpl when we use
cxf with camel. Please share your thoughts on this. 



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-CXF-Jaxrs-service-implementation-class-s-methods-are-not-executing-tp5749733p5757174.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel CXF Jaxrs service implementation class's methods are not executing

Posted by Willem Jiang <wi...@gmail.com>.
camel-cxfrs consumer just need to route the message into camel route, if the implementation method is called, the camel route cannot process the request message any more.

If you just want to call the implementation class’s method, you can use cxf-rs directly.

--  
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 September 9, 2014 at 8:32:51 PM, vrahul (vrahul1991@gmail.com) wrote:
> This became a code quality concern for us. Can you please explain that why
> cxf-rs server bean implementation behave is different with camel. is there
> any way i can implement cxf-rs services the same way as it is.
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-CXF-Jaxrs-service-implementation-class-s-methods-are-not-executing-tp5749733p5756246.html  
> Sent from the Camel - Users mailing list archive at Nabble.com.
>