fuse case study
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.6 KiB

<?xml version="1.0" encoding="UTF-8"?>
<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.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
">
<!-- the order service -->
<bean id="orderService" class="camelinaction.DummyOrderService"/>
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
<route>
<!-- use CXF-RS to setup the REST web service using the resource class
and use the simple binding style which is recommended to use -->
<from uri="cxfrs:http://localhost:8080?resourceClasses=camelinaction.RestOrderService&amp;bindingStyle=SimpleConsumer"/>
<!-- call the route based on the operation invoked on the REST web service -->
<toD uri="direct:${header.operationName}"/>
</route>
<!-- routes that implement the REST services -->
<route>
<from uri="direct:createOrder"/>
<bean ref="orderService" method="createOrder"/>
</route>
<route>
<from uri="direct:getOrder"/>
<bean ref="orderService" method="getOrder(${header.id})"/>
</route>
<route>
<from uri="direct:updateOrder"/>
<bean ref="orderService" method="updateOrder"/>
</route>
<route>
<from uri="direct:cancelOrder"/>
<bean ref="orderService" method="cancelOrder(${header.id})"/>
</route>
</camelContext>
</beans>