How does your camel context look like (or at least the relevant route). What version of camel?

Hadrian

On 01/12/2012 09:49 AM, m.jimen.blazquez wrote:
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.

--
Hadrian Zbarcea
Principal Software Architect
Talend, Inc
http://coders.talend.com/
http://camelbot.blogspot.com/

Reply via email to