10.6.4.2. 第 II 部分
当 direct:abc
端点将消息发送到 direct:xyz
时,上面的转换器会应用到以下路由定义:
Java DSL:
from("direct:abc") .inputType("xml:ABCOrder") .to("direct:xyz"); from("direct:xyz") .inputType("xml:XYZOrder") .to("somewhere:else");
XML DSL:
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"> <route> <from uri="direct:abc"/> <inputType urn="xml:ABCOrder"/> <to uri="direct:xyz"/> </route> <route> <from uri="direct:xyz"/> <inputType urn="xml:XYZOrder"/> <to uri="somewhere:else"/> </route> </camelContext>