jbang/blueprint-to-yaml/order-blueprint.xml (26 lines of code) (raw):
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
<!-- beans -->
<bean id="orderHelper" class="com.foo.OrderHelper"/>
<bean id="orderService" class="com.foo.OrderService"
factory-ref="orderHelper" factory-method="newOrderService">
<argument index="0" value="true"/>
<argument index="1" ref="office"/>
</bean>
<!-- uses blueprint property placeholder ${xxx} syntax -->
<bean id="office" class="com.foo.Address">
<property name="zip" value="${zipCode}"/>
<property name="street" value="${streetName}"/>
</bean>
<!-- embed Camel with routes -->
<camelContext xmlns="http://camel.apache.org/schema/blueprint">
<route>
<from uri="timer:xml?period={{time:1000}}"/>
<setBody>
<simple>${random(1000)}</simple>
</setBody>
<bean ref="orderService"/>
<log message="${body}"/>
</route>
</camelContext>
</blueprint>