You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by whofeih <wh...@gmail.com> on 2011/07/08 04:58:59 UTC

Re: Help with Camel JAXB (SMX4 + Camel 2.1.0)

Can anyone help me? I can't seem to make partialClass to work. My class
doesn't have @XMLRootElement that's why i decided to give partialClass a
try, but still no luck with .marshall(jaxbDataFormat)

below is my code.

JaxbDataFormat dataFormat = new JaxbDataFormat(true);
        dataFormat.setContextPath("org.hl7.v2xml");
        dataFormat.setPartClass("org.hl7.v2xml.ORUR01CONTENT");

        from("activemq:{{tmc-emr-cdms-route.jms.destination.route}}")
            .to("log:" + SignedClinicalDocumentRouteBuilder.class.getName()
+ "?level=INFO&showAll=true")
            .beanRef("signedClinicalDocumentProcessor", "process")
            .marshal(dataFormat)
            .to("direct:endpoint");

        from("direct:endpoit")
            .to("activemq:{{tmc-emr-cdms-route.jms.destination.ORU}}");

--
View this message in context: http://camel.465427.n5.nabble.com/Help-with-Camel-JAXB-SMX4-Camel-2-1-0-tp470566p4563229.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Help with Camel JAXB (SMX4 + Camel 2.1.0)

Posted by Willem Jiang <wi...@gmail.com>.
What kind of error did you get?
Can you show us your stack trace?

BTW, there is an partical Class example that you may want to take a look.

  <jaxb prettyPrint="false" contextPath="org.apache.camel.example"
                 partClass="org.apache.camel.example.PurchaseOrder"
                 partNamespace="{http://example.camel.org/apache}po" />

On 7/8/11 10:58 AM, whofeih wrote:
> Can anyone help me? I can't seem to make partialClass to work. My class
> doesn't have @XMLRootElement that's why i decided to give partialClass a
> try, but still no luck with .marshall(jaxbDataFormat)
>
> below is my code.
>
> JaxbDataFormat dataFormat = new JaxbDataFormat(true);
>          dataFormat.setContextPath("org.hl7.v2xml");
>          dataFormat.setPartClass("org.hl7.v2xml.ORUR01CONTENT");
>
>          from("activemq:{{tmc-emr-cdms-route.jms.destination.route}}")
>              .to("log:" + SignedClinicalDocumentRouteBuilder.class.getName()
> + "?level=INFO&showAll=true")
>              .beanRef("signedClinicalDocumentProcessor", "process")
>              .marshal(dataFormat)
>              .to("direct:endpoint");
>
>          from("direct:endpoit")
>              .to("activemq:{{tmc-emr-cdms-route.jms.destination.ORU}}");
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Help-with-Camel-JAXB-SMX4-Camel-2-1-0-tp470566p4563229.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang