Hi ,
I was recently trying to use servicemix-jms consumer to read some plain text (non-xml) message off the JMS Queue and pass it onto a bean endpoint. While doing this I observed if my message (JMSMessage) is simple plain text the jms consumer throws wstax exception for StaxIn interceptor.

While debugging I found that DefaultConsumerMarshaller.populateMessage() checks if the Message is TextMessage and creates a Soap Message and calls msg.setContent(...) which simply adds the contents of the TextMessage added into InputStream onto SoapMessage. Later when the StaxInInterceptor.handleMessage() is called it assumes that the contents of the input Stream added onto the Soap message are XML and tries to create ExtendedXMLStreamReader() which essentially causes wstx exception since the message in input stream is plain text and not XML.


Is there any way to use the plain text message or the message coming in should always be some XML message? For now I simply changed the plain text message with XML fragment to workaround (since the contents were not important to me at this stage) but am I missing something?

Regards,

Ulhas Bhole

Reply via email to