After investigation the problem is due to the binding of the Camel Message into a JBI message The camel message is not an XML message, it's a simple string. As a result converting it into a JBI message the content is null. This can be seen in method getJbiInContent(Exchange camelExchange).
I suppose it's necessary to call a message converter but how to do this? Christophe xtof wrote: > > Hi, > > I use Camel Mail component to inject mail into service mix. > > I've just implement a simple test with a camel su and a bean su. > > The camel context is the following: > > <beans xmlns="http://www.springframework.org/schema/beans" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation=" > http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans-2.0.xsd > http://activemq.apache.org/camel/schema/spring > http://activemq.apache.org/camel/schema/spring/camel-spring.xsd > "> > > <camelContext id="camel" > xmlns="http://activemq.apache.org/camel/schema/spring"> > <route> > <from uri="pop3s://[EMAIL PROTECTED]:995?password=xxxx"/> > <to > uri="jbi:service:http://servicemix.apache.org/replaceMe/service"/> > </route> > </camelContext> > </beans> > > Running this test I've got the following error. Any idea? > > Thank > Christophe > > > DEBUG - SedaFlow - Called Flow send > DEBUG - DeliveryChannelImpl - Waiting for exchange > ID:192.168.1.125-116962004b3-2:0 (170f98) to be answered i > n DeliveryChannel{servicemix-camel} from sendSync > [Fatal Error] :1:1: Content is not allowed in prolog. > DEBUG - SedaQueue - > [EMAIL PROTECTED] dequeued > exchange: InO > nly[ > id: ID:192.168.1.125-116962004b3-2:0 > status: Active > role: provider > service: {http://servicemix.apache.org/replaceMe}service > endpoint: endpoint > in: Unable to display: org.xml.sax.SAXParseException: Content is not > allowed in prolog. > ] > DEBUG - BeanComponent - Received exchange: status: > Active, role: provider > DEBUG - BeanComponent - Retrieved correlation id: null > Received exchange: InOnly[ > id: ID:192.168.1.125-116962004b3-2:0 > status: Active > role: provider > service: {http://servicemix.apache.org/replaceMe}service > endpoint: endpoint > in: Unable to display: java.io.IOException: Stream closed > ] > DEBUG - DeliveryChannelImpl - Send > ID:192.168.1.125-116962004b3-2:0 in DeliveryChannel{servicemix-bean} > DEBUG - SedaFlow - Called Flow send > DEBUG - SedaQueue - > [EMAIL PROTECTED] dequeued > exchange: > InOnly[ > id: ID:192.168.1.125-116962004b3-2:0 > status: Done > role: consumer > service: {http://servicemix.apache.org/replaceMe}service > endpoint: endpoint > in: Unable to display: java.io.IOException: Stream closed > ] > DEBUG - DeliveryChannelImpl - Notifying exchange > ID:192.168.1.125-116962004b3-2:0(170f98) in DeliveryChannel{ > servicemix-camel} from processInboundSynchronousExchange > DEBUG - DeliveryChannelImpl - Notified: > ID:192.168.1.125-116962004b3-2:0(170f98) in DeliveryChannel{servicemi > x-camel} from sendSync > -- View this message in context: http://www.nabble.com/Error-using-Camel-mail-component-tf4928485s12049.html#a14115602 Sent from the ServiceMix - User mailing list archive at Nabble.com.
