camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <>
Subject Re: Newbie: how to unmarshal and then route using object member value?
Date Fri, 15 May 2009 03:12:42 GMT

you could use the bean language[1] get the full control of the Body Object.
The route rule could be

public class MyBean {
  public boolean isGradeA(@Body Student student) {
You can find more information about the Parameter Binding Annotations


Enjoy your camel riding :)


uprooter wrote:
> Hello everyone, Thank you for this precious project.
> I'm trying to migrate traditional JMS processing to camel.
> I need to read from JMS topic and unmarshal to JAXB object. and then route
> according to an Enum value in that object.
> (e.g unmarshal XML to Student object and route by student.getGrade())
> I also like it if it will be possible to unmarshal only once.
> I tried starting with something like
> from("TOPIC").convertBodyTo(Student.class).choice()
> but I can't figure out how to make the ChoiceDefinition "know" my Student
> object
> What should I look for?
> John.

View raw message