The message was not valid xml. When I used valid xml the error did not occur.
I made a poor assumption that a JMS message was processed as an xml message.
This turned out to be incorrect. Thanks for the help.
James.Strachan wrote:
>
> 2008/7/24 Stephen J <[EMAIL PROTECTED]>:
>>
>> I have a camel route defined as follows:
>>
>> <route>
>> <from uri="amq:fruitTree"/>
>> <process ref="fruitHeaderInjector" />
>> <filter>
>> <xpath>$fruitType = 'apple'</xpath>
>> <to uri="velocity:templates/AppleTemplate.vm" />
>> <process ref="velocityProcessor" />
>> </filter>
>> <filter>
>> <xpath>$fruitType = 'orange'</xpath>
>> <to uri="velocity:templates/OrangeTemplate.vm" />
>> <process ref="velocityProcessor" />
>> </filter>
>> </route>
>>
>> where the route pulls a message from an ActiveMQ queue, then adds a
>> header
>> with the fruitHeaderInjector, then based on the xpath filter should
>> process
>> the message with one of the velocity templates defined.
>>
>> The only code in the process method of the header injector class is:
>> exch.getIn().setHeader("fruitType", exch.getIn().getBody(String.class));
>>
>> When camel tries to process the xpath expression I get the following
>> error:
>> "Content is not allowed in prolog."
>>
>> Can someone tell me if I'm doing something wrong with the header
>> processor,
>> or if I've run into a bug?
>> I have a junit test of the described application if that will help.
>
> Is the payload of the message valid XML? Turn on trace to see...
> http://activemq.apache.org/camel/tracer.html
>
> my guess is you might have newlines before the first < character or
> something.
>
>
> --
> James
> -------
> http://macstrac.blogspot.com/
>
> Open Source Integration
> http://open.iona.com
>
>
--
View this message in context:
http://www.nabble.com/XPath-filter-with-spring-xml-configuration-question-tp18634280s22882p18634708.html
Sent from the Camel - Users mailing list archive at Nabble.com.