I have an XML file with the following route: (I have tested it and it works fine)
<route> <from uri="file:camel/input"/> <choice> <when> <language language="simple">${header.CamelFileName} regex '^.*xml$'</language> <to uri="file:camel/xmlFolder"/> </when> <when> <language language="simple">${header.CamelFileName} regex '^.*(csv|csl)$'</language> <to uri="file:camel/cvsFolder"/> </when> <otherwise> <to uri="file:camel/others"/> <stop/> </otherwise> </choice> </route> Now I want to define the route in a separate XML file using routeContext and access it in the main xml file using routeContextRef. I havee created the route as <routeContext id="ftpToJms" xmlns="http://camel.apache.org/schema/spring"> <route> <from uri="file:camel/input"/> <choice> <when> <language language="simple">${header.CamelFileName} regex '^.*xml$'</language> <to uri="file:camel/xmlFolder"/> </when> <when> <language language="simple">${header.CamelFileName} regex '^.*(csv|csl)$'</language> <to uri="file:camel/cvsFolder"/> </when> <otherwise> <to uri="file:camel/others"/> <stop/> </otherwise> </choice> </route> </routeContext> If I save it as ftpToJms.xml then how can I refer to it using routeContextRef? I did follwoing but it is failing: <camelContext xmlns="http://camel.apache.org/schema/spring"> <routeContextRef ref="ftpToJms.xml"/> </camelContext> -- View this message in context: http://camel.465427.n5.nabble.com/separate-files-are-the-Spring-DSL-tp4903855p4903855.html Sent from the Camel Development mailing list archive at Nabble.com.