camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe San <codeintheo...@gmail.com>
Subject Re: JAXB Data Format
Date Thu, 16 Aug 2012 12:32:39 GMT
I have decided to use JAXB instead of xStream. My route definition looks
like this:

        final JaxbDataFormat jaxb = new
JaxbDataFormat("com.example.filexml");
        context.addRoutes(new RouteBuilder() {
            public void configure() {
                from("file://my.xml").unmarshal(jaxb).bean(new
ProcessorBean()).to("file://my.xml");
            }
        });

How do I get hold of the UnMarshalled Java Object (say Person.java) in my
ProcessorBean. Also, when I use a bean for Processing, how does Camel know
which method to invoke in that bean?

Regards,
Jothi

On Thu, Aug 16, 2012 at 1:56 PM, Joe San <codeintheopen@gmail.com> wrote:

> Guys,
>
> I have a route which is defined as below:
>
> from("file://my.xml").marshal().xstream("UTF-8").bean(new
> ProcessorBean()).to("file://my.xml");
>
> All I want to do is access the my.xml in my ProcessorBean. Where and how
> do I specify the Java object which will be filled with the values in the
> xml file?
>
> Regards,
> Jothi
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message