Hi

There is a XML Schema for Camel. Use that to validate the XML file,
and then know which tags can be used.


And see this cookbook about loading a route from XML into an existing
CamelContext
http://camel.apache.org/loading-routes-from-xml-files.html


On Wed, Nov 30, 2011 at 7:01 PM, mayank27 <[email protected]> wrote:
> Hi Freeman,
>
> I placed the <camel context> element around <routes> element but got the
> below error :
>
> cvc-complex-type.2.4.a: Invalid content was found starting with element
> 'camel:routes'. One of '{"http://
>  camel.apache.org/schema/spring":properties,
> "http://camel.apache.org/schema/spring":propertyPlaceholder,
>  "http://camel.apache.org/schema/spring":package,
> "http://camel.apache.org/schema/spring":packageScan,
>  "http://camel.apache.org/schema/spring":contextScan,
> "http://camel.apache.org/schema/spring":jmxAgent,
>  "http://camel.apache.org/schema/spring":template,
> "http://camel.apache.org/schema/
>  spring":consumerTemplate, "http://camel.apache.org/schema/spring":proxy,
> "http://camel.apache.org/schema/
>  spring":export, "http://camel.apache.org/schema/spring":errorHandler,
> "http://camel.apache.org/schema/
>  spring":routeBuilder,
> "http://camel.apache.org/schema/spring":routeContextRef,
> "http://camel.apache.org/
>  schema/spring":threadPoolProfile,
> "http://camel.apache.org/schema/spring":threadPool, "http://
>  camel.apache.org/schema/spring":endpoint,
> "http://camel.apache.org/schema/spring":dataFormats, "http://
>  camel.apache.org/schema/spring":redeliveryPolicyProfile,
> "http://camel.apache.org/schema/
>  spring":onException, "http://camel.apache.org/schema/spring":onCompletion,
> "http://camel.apache.org/
>  schema/spring":intercept,
> "http://camel.apache.org/schema/spring":interceptFrom,
> "http://camel.apache.org/
>  schema/spring":interceptSendToEndpoint,
> "http://camel.apache.org/schema/spring":route}' is expected.
>
>
>
> Here's my xml route file which im trying to load dynamically:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans";
>       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>       xmlns:osgi="http://camel.apache.org/schema/osgi";
>       xmlns:beans="http://www.springframework.org/schema/beans";
>       xmlns:camel="http://camel.apache.org/schema/spring";
>       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://camel.apache.org/schema/osgi
> http://camel.apache.org/schema/osgi/camel-osgi.xsd
>       http://www.springframework.org/schema/osgi-compendium
> http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd
>       http://www.springframework.org/schema/osgi
> http://www.springframework.org/schema/osgi/spring-osgi.xsd
>       http://www.springframework.org/schema/context
> http://www.springframework.org/schema/context/spring-context.xsd";>
>
>        <camel:camelContext>
>                <camel:routes>
>
>                    <camel:route id="bar">
>                        <camel:from uri="direct:start"/>
>                        <camel:to uri="mock:bar"/>
>                    </camel:route>
>                </camel:routes>
>        </camel:camelContext>
> </beans>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Update-camel-route-at-runtime-using-config-admin-tp4965455p5036328.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to