Hi
I now implemented an XPathSplitter but facing some strange problem. I am
sending a Jms TextMessage that contains an XML Document as text. The xml is
made with help of the ecs library.
When I use Camel to take the message and route it to the receiver, the
receiver also receives a TextMessage and can print out the text. I now want
to split the message up into more messages with xpath. My expression is
that:
XPathBuilder xPathBuilder=new XPathBuilder("//trainSchedule/stops/station");
from("activemq:queue:camel.train.plan.queue")
.splitter(xPathBuilder)
.to("activemq:queue:camel.train.plan.queue.receiver");
When I now start the consumer, receiver and camelContext, my receiver does
not receive a TextMessage, anymore but an ObjectMessage. The object in the
message is an object of the class
com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl.
What happened here to my TextMessage? Can it be a problem with my xpath or
do I need some additional statements so that the receiver get a TextMessage
again? I think my xpath expression is correct, as the receiver receives the
correct amount of messages it should receive.
Thanks for any help
Robert