camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "m.jimen.blazquez" <m.jimen.blazq...@gmail.com>
Subject @Bean annotation in REST service definition
Date Thu, 12 Jan 2012 14:49:08 GMT
Hi,

I am managing a rest service with cxfrs camel component.

In the definition of my rest service, I would like to invoke a bean:

@POST
@Path("service/{service}/{version}/{operation}")
@Consumes("application/json")
@Produces("application/json")
public void people(@PathParam("service")String service, 
		@PathParam("version") String version,
		@PathParam("operation") String operation, 
		*@Bean(ref = "routeHelper", method="getObject")* Object json) {
	return null;
}

so that when I invoke the service, the content in the body (json) is
transformed into an object.

I have registered the bean in the context:

<bean id="routeHelper"	class="myPackage.RouteHelper" />

The problem is that the routeHelper.getObject is never called. I have no
error in the execution, I obtain the body of the Exchange with the four
parameters as if the bold text has not been read.

┬┐Am I trying to do something is not permitted?

I have read in other post that cxfrs component unmarshalls the json but I
cannot find the way to manage this.

Kindest regards

--
View this message in context: http://camel.465427.n5.nabble.com/Bean-annotation-in-REST-service-definition-tp5140117p5140117.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message