camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: can't tranform Body to DOM
Date Fri, 24 Sep 2010 13:22:58 GMT
On Fri, Sep 24, 2010 at 3:17 PM,  <patrice.godard@orange-ftgroup.com> wrote:
> I just noticed that my BodyType is set to byte[].
> Maybe it explains why the conversion to Dom produces a null?

What version of Camel are you using?

I would assume we had a byte[] -> Dom converter out of the box. But
maybe I am mistaking.
And we recently added some more XML related converters in 2.5.


> My messages are XML files dropped in a scanned folder and then picked-up by a route that
forwards them into a JMS Topic where they are picked-up by my main route.
>
>> -----Message d'origine-----
>> De : Claus Ibsen [mailto:claus.ibsen@gmail.com]
>> Envoyé : vendredi 24 septembre 2010 14:55
>> À : users@camel.apache.org
>> Objet : Re: can't tranform Body to DOM
>>
>> On Fri, Sep 24, 2010 at 2:48 PM,  <patrice.godard@orange-ftgroup.com>
>> 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: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>
> *********************************
> 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: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message