camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tecoripa <pra...@wisc.edu>
Subject Re: Camel, Spring, routeContextRef and namespaces?
Date Wed, 16 Feb 2011 16:02:25 GMT

I was able to fix the problem, after some more experimenting:

If I declare the Atom namespace and xsi at the top of myroutes.xml, then I
should remove the declaration everywhere else, and dispense with the
namespace prefix in my xpath.

This configuration resolved the problem:

myroutes.xml:

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:atom="http://www.w3.org/2005/Atom"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
http://www.w3.org/2005/Atom http://www.kbcafe.com/rss/atom.xsd.xml">

<!-- Camel route -->
<routeContext id="myroutes" xmlns="http://camel.apache.org/schema/spring">
<route id="nstestexternal">
<from uri="activemq:MyQueue"/>
<setHeader headerName="myheader">
<xpath resultType="java.lang.String">/entry/summary</xpath>
</setHeader>
<to
uri="log:my.company.com.nstest?level=INFO&amp;showHeaders=true&amp;showProperties=true"/>
</route>
</routeContext>

</beans>

There's no need to declare the Atom namespace anywhere in the camel-context
file, then.  Thanks again, Ashwin.
-- 
View this message in context: http://camel.465427.n5.nabble.com/Camel-Spring-routeContextRef-and-namespaces-tp3386814p3387896.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message