LibraryLink ToToggle FramesPrintFeedback

Using the Router Schema in an XML File

The root element of the router schema is camelContext, which is defined in the XML namespace, Router configurations are typically embedded in other XML configuration files (for example, in a Spring configuration file). In general, whenever a router configuration is embedded in another configuration file, you must specify the location of the router schema (so that the router configuration can be parsed). Example 3.1 shows how to embed the router configuration, camelContext, in an arbitrary document, DocRootElement.

where the schema location is specified as, which gives the location of the schema on the Apache Web site. This location always contains the latest, most up-to-date version of the XML schema. If you prefer to tie your configuration to a specific version of the schema, change the schema file name to camel-spring-Version.xsd, where Version can be one of: 1.0.0, 1.1.0, 1.2.0, 1.3.0, or 1.4.0. For example, the location of schema version 1.4.0 would be specified as

Example 3.2 shows an example of embedding a router configuration, camelContext, in a Spring configuration file.