You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Robert Thullner <rt...@gmx.at> on 2008/01/20 10:06:07 UTC

JMS TextMessages only XML content?

Hi
 
I have got an JMS Consumer SU that receives messages from a java program.
When I send a TextMessage, that contains XML content everything works fine.
But when the content of 
the TextMessage is not XML I get an exception when the message is received?
 
Am I only allowed to send XML content in TextMessages or am I doing
something wrong here?
 
Thanks for help
Robert

Re: JMS TextMessages only XML content?

Posted by Bruce Snyder <br...@gmail.com>.
On Jan 20, 2008 2:06 AM, Robert Thullner <rt...@gmx.at> wrote:
> Hi
>
> I have got an JMS Consumer SU that receives messages from a java program.
> When I send a TextMessage, that contains XML content everything works fine.
> But when the content of
> the TextMessage is not XML I get an exception when the message is received?
>
> Am I only allowed to send XML content in TextMessages or am I doing
> something wrong here?

Yes, per the JBI 1.0 spec, a NormalizedMessage body should be XML.
However, in ServiceMix, some components allow for a custom marshaler
to be plugged in and it is via a custom marshaler that you can
override this behavior. See the following document that touches on
building a custom marshaler:

http://servicemix.apache.org/705-intermediate-writing-the-marshaler-class.html

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/