1) Make a SwitchYard application with a Camel route.
2) Have the Camel route look something like below.
3) Slightly move one of the Camel components on the canvas, to force a 'save'. The canvas (and underlying XML) will lose components.
----------------- Sample route that shows the problem --------------------------
<?xml version="1.0" encoding="ASCII"?>
<routes xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="switchyard://GreetingService"/>
<log message="GreetingService - message received: ${body}"/>
<!-- extract address, for later -->
<setHeader headerName="Address">
<xpath resultType="java.lang.String">
/myXml/Address
</xpath>
</setHeader>
<!-- do the same with numofpages -->
<setHeader headerName="NumOfPages">
<xpath resultType="java.lang.String">
/myXml/NumOfPages
</xpath>
</setHeader>
<split>
<xpath>/myXml/Numbers/Number</xpath>
<to uri="switchyard://NumberProcessor"/>
</split>
<!-- Now work with Address, NumOfPages -->
<log message="Address:${header.Address}" />
<log message="NumOfPages:${header.NumOfPages}" />
</route>
</routes>
1) Make a SwitchYard application with a Camel route.
2) Have the Camel route look something like below.
3) Slightly move one of the Camel components on the canvas, to force a 'save'. The canvas (and underlying XML) will lose components.
----------------- Sample route that shows the problem --------------------------
<?xml version="1.0" encoding="ASCII"?>
<routes xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="switchyard://GreetingService"/>
<log message="GreetingService - message received: ${body}"/>
<!-- extract address, for later -->
<setHeader headerName="Address">
<xpath resultType="java.lang.String">
/myXml/Address
</xpath>
</setHeader>
<!-- do the same with numofpages -->
<setHeader headerName="NumOfPages">
<xpath resultType="java.lang.String">
/myXml/NumOfPages
</xpath>
</setHeader>
<split>
<xpath>/myXml/Numbers/Number</xpath>
<to uri="switchyard://NumberProcessor"/>
</split>
<!-- Now work with Address, NumOfPages -->
<log message="Address:${header.Address}" />
<log message="NumOfPages:${header.NumOfPages}" />
</route>
</routes>
Camel routes have parts disappear after unrelated operations.