camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: can't tranform Body to DOM
Date Fri, 24 Sep 2010 12:54:44 GMT
On Fri, Sep 24, 2010 at 2:48 PM,  <> wrote:
> Hi,
> I receive JMS messages which are actually XML documents.
> In a processor I'm trying to get them as a DOM document since I need to process them
in a certain way.
> I'm doing this:
>  org.w3c.dom.Document doc = ex.getIn().getBody(org.w3c.dom.Document.class);
> And it does not seem to work (doc is always null). I don't get any error message.
> I have xpath() statements in my route, which are being correctly evaluated.
> I also have xslt transform endpoints which are working as expected.
> But here I need to replace an attribute value and I'd like to do without xslt.

use getMandatoryBody if you want Camel to barf if it could not convert it.

> Patrice
> *********************************
> This message and any attachments (the "message") are confidential and intended solely
for the addressees.
> Any unauthorised use or dissemination is prohibited.
> Messages are susceptible to alteration.
> France Telecom Group shall not be liable for the message if altered, changed or falsified.
> If you are not the intended addressee of this message, please cancel it immediately and
inform the sender.
> ********************************

Claus Ibsen
Apache Camel Committer

Author of Camel in Action:
Open Source Integration:

View raw message