You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by gliesian <ro...@gliesian.com> on 2013/09/12 03:23:21 UTC

Dataformat - jaxb help, please.

How would I replace this:

  // Works
  JAXBContext context = JAXBContext.newInstance("aaa.bbb.ccc");
  ByteArrayInputStream input = new ByteArrayInputStream(msg.getBytes());
  Unmarshaller unmarshaller = context.createUnmarshaller();
  JAXBElement elm = unmarshaller.unmarshal(new StreamSource(input),
SpecialType.class);

with something like this:

   // Incomplete
   <route  autoStartup="true"  >
     <from uri="weblogic:topic:TOPIC1"/>
     <to uri="dataformat:jaxb:unmarshal?contextPath=aaa.bbb.ccc"/>
     <process ref="SpecialProcessor"/> 
   </route>

That is, where do I put SpecialType.class?



--
View this message in context: http://camel.465427.n5.nabble.com/Dataformat-jaxb-help-please-tp5739193.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Dataformat - jaxb help, please.

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Add camel-jaxb as dependency.


On Thu, Sep 12, 2013 at 3:34 AM, gliesian <ro...@gliesian.com> wrote:
> Btw, I'm getting this:
>
> Caused by: java.lang.IllegalArgumentException: Cannot find data format with
> name: jaxb
>
> And I am using:
>
>    <dependency>
>             <groupId>org.apache.camel</groupId>
>             <artifactId>camel-core</artifactId>
>             <version>2.12.0</version>
>         </dependency>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Dataformat-jaxb-help-please-tp5739193p5739194.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Dataformat - jaxb help, please.

Posted by gliesian <ro...@gliesian.com>.
Btw, I'm getting this:

Caused by: java.lang.IllegalArgumentException: Cannot find data format with
name: jaxb

And I am using:

   <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-core</artifactId>
            <version>2.12.0</version>
        </dependency>



--
View this message in context: http://camel.465427.n5.nabble.com/Dataformat-jaxb-help-please-tp5739193p5739194.html
Sent from the Camel - Users mailing list archive at Nabble.com.