Hi,

You can find the same example here[1], basic camel-cxfrs consumer just put the 
operation name and invocation parameters into the message, camel route can do 
the transformation as you want.  If you just want to use bean to provide the 
service, you can use CXF directly. 

[1]http://camel.apache.org/cxfrs.html 

-- 
Willem Jiang

FuseSource
Web: http://www.fusesource.com (http://www.fusesource.com/)
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
          http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang 
Weibo: willemjiang



On Wednesday, August 15, 2012 at 2:32 AM, paramjyotsingh wrote:

> I am trying to expose restful service using camel:cxfrs
> 
> <cxf:rsServer address="http://localhost:8080"; id="rsServer"
> serviceClass="mypackage.ServiceClass"/>
> 
> <bean id="serviceBean" class="mypackage.Servicebean"/>
> 
> <camel:from uri="cxfrs://bean://rsServer"/>
> <camel:bean ref="serviceBean"/>
> 
> @Path("/path")
> public class ServiceClass {
> 
> @GET
> @Path("{id}")
> public String getName(@PathParam("id") int id){
> // logic to get Name and return
> }
> 
> @POST
> @Path("{id}")
> public void update(@PathParam("id") int id, String name){
> // logic to update name
> }
> }
> 
> Now, in this case camel only uses these methods to expose service, these are
> not actually invoked.
> 
> In ServiceBean class how should i write methods corresponding for GET and
> POST methods.
> 
> Please help.
> 
> 
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/cxfrs-GET-and-POST-handling-in-bean-tp5717342.html
> Sent from the Camel - Users mailing list archive at Nabble.com 
> (http://Nabble.com).



Reply via email to