I have got a ServiceMix 1.0 + JMS 1.02 configuration working as follows

MyJMSClient > send => queue/Q1 ==> onMessage > ServiceMix JmsReceiverComponent => ... ESB... ==> ServiceMix JmsSenderComponent > send ==> queue/Q2 ==> receive > MyJMSClient

I thought this would send the same message out as went in.

Unfortunately it blew up first time when the JmsMarshaler tried to convert the NM back into a TextMessage during the JmsSenderComponent

My input JMS Message data was a TextMessage with text content "Fred"

The exception was:

[Fatal Error] :1:1: Content is not allowed in prolog.
14/11/2005
15:40:54 org.servicemix.components.util.PojoSupport fail
SEVERE: org.springframework.jms.UncategorizedJmsException: Uncategorized exception occured during JMS processing; nested exception is javax.jms.JMSException: Failed to create JMS Message: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: Content is not allowed in prolog.; nested exception is javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: Content is not allowed in prolog.

----

I did not relise that the JMSMessage content needed to be XML for ServiceMix to cope with it.

I see that http://www.servicemix.org/JMS says I could customize the JmsMarshaller to do something tricky if I wanted but I didn't think I was doing anything tricky. I just thought I would see my "Fred" message go all the way through the ESB unscathed.

What are the rules for valid message content - ie does ServiceMix expect XML content for all input? I hunted around and found http://www.servicemix.org/Does+JBI+depend+on+XML+and+WSDL which seems to say yes everything is XML unless POJO bindings are used but I don't quite see how POJO bindings are related to this problem.

So probably this is just a user error, but I am still confused if my non-XML input JMSMessage was destined to fail then why did the JmsMarshaller accept the data as OK in the 1st place (when the JmsReceiverComponent turned my TextMessage into an NM)

Thanks,
Peter.

Reply via email to