5.8. Using Apache Camel with Orchestra
| Chapter 5. User guide |

## 5.8. Using Apache Camel with Orchestra

When using Orchestra with CXF Web Service framework, Orchestra can use Apache Camel as transport for web services interactions.

Orchestra-Camel integration allows processes to produce/consume messages on the Camel context. It allows a process to use for example JMS, mail, file connectors to connect to remote services.

For more information about Apache Camel features, please read Camel documentation

### 5.8.1. How to create a Camel context for a process ?

Orchestra uses Camel Spring language to describe routes. To define the Camel routes deployed with a process, add a camel-context.xml file in your BAR archive. Orchestra will deploy and start the routes with the process. If your camel-context.xml uses external Java classes, you can add them too to the BAR archive.

Example of camel-context.xml file:

    <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="
           http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
           http://camel.apache.org/schema/spring
            http://camel.apache.org/schema/spring/camel-spring.xsd">
      <camelContext xmlns="http://camel.apache.org/schema/spring" autoStartup="false">
        <route>
          <from uri="file:///inputDir" />
          <to uri="direct:hello"/>
        </route>
      </camelContext>
    </beans>

5.7. Monitoring and administration with JMX |  | 5.8.2. How to use camel context instead of HTTP for Web Service interactions ?