Claus,

Thanks for the email.

Could you please provide me with the Jira ticket id?

I used the following for my JaxbDataFormat and I guess this is the correct
one as well.

org.apache.camel.model.dataformat.JaxbDataFormat

Here is my route

from("file:/Users/joe/Desktop/in?noop=true").unmarshal(jaxb).process(new
EIMProcessor()).to("file:/Users/joe/Desktop/out/")

Regards,
Jothi


On Tue, Feb 12, 2013 at 8:15 AM, Claus Ibsen <claus.ib...@gmail.com> wrote:

> On Mon, Feb 11, 2013 at 7:20 PM, Joe San <codeintheo...@gmail.com> wrote:
> > Does the Scala DSL support JAXB marshal and unmarshal? I have the
> following
> > scenario where I have xjc generated Java files. I give these files to my
> > JaxbDataFormat and assign it to a val in Scala as below:
> >
> > val jaxb = new JaxbDataFormat("com.test.model.generated.Shiporder")
> >
> > I now reference this in my route as below:
> >
> > from("file:/Users/joe/Desktop/in?noop=true").unmarshal(jaxb)......
> >
> > But the Scala compiler seems not to be happy and spits out strange error:
> >
> > scala: type mismatch;
> >  found   : java.lang.String("com.test.model.generated.Shiporder")
> >  required: Boolean
> >     val jaxb = new JaxbDataFormat("com.test.model.generated.Shiporder")
> >
> > Help appreciated.
> >
>
> Yes Scala DSL supports marshal / unmarshal. However it does not have
> the data formats defined in the DSL out of the box, as in Java or XML
> DSLs.
> We have a ticket about this.
>
> You need to create them as you do. Just mind there is 2 classes named
> JaxbDataFormat, and you need to use the correct one in the DSL.
>
>
> > Regards,
> > Joe
> >                                   ^
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cib...@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>

Reply via email to