camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gilboy <josephoto...@gmail.com>
Subject Issue setting property on the object which in the exchange body
Date Tue, 20 Jan 2015 20:26:37 GMT
Hi 

In my route, I have a header property on the exchange called age. In the
body of the exchange I have a person object. I want to set the age property
on the person object.

If I do something like the following in my route and have the setAge
property on the Person bean use the header annotation(e.g.
setAge(@Header("age")Integer age)) the property will get correctly set.
However, the setter message is void, hence the body on the exchange gets
wiped. I can have the setter method return "*this*" but it feels wrong

    <transform>
      <simple>${body.setAge}</simple>
    </transform>

Any other solution?
Thanks
Joe



--
View this message in context: http://camel.465427.n5.nabble.com/Issue-setting-property-on-the-object-which-in-the-exchange-body-tp5761960.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message