camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Thullner" <rthull...@gmx.at>
Subject AW: XPath splitter again
Date Fri, 28 Dec 2007 13:35:25 GMT
Thanks for the quick reply. It works now. 

But I am still a little confused as I call the XML toString() method to set
the text of the TextMessage and I always send TextMessages. Does the
TextMessage get converted somewhere into an ObjectMessage?
 
Greetings
Robert

-----Urspr√ľngliche Nachricht-----
Von: Roman Kalukiewicz [mailto:roman.kalukiewicz@gmail.com] 
Gesendet: Freitag, 28. Dezember 2007 14:27
An: camel-user@activemq.apache.org
Betreff: Re: XPath splitter again

What you have in your message is XML Object - not a String - so
ObjectMessage is sent.

Try to do it this way:

from("activemq:queue:camel.train.plan.queue")
.splitter(xPathBuilder)
.convertBodyTo(String.class)
.to("activemq:queue:camel.train.plan.queue.receiver");

Then activemq endpoint will receive String as a payload and should create
TextMessage instead of ObjectMessage.

Roman


Mime
View raw message