我是否可以使用Camel解封器将多种数据格式(JSON,XML等)解组为XML?
此“通用”解组器将用作例如:
<route id="myRoute">
<from uri="file:test/input"/>
<!-- The input can be in JSON or in XML -->
<unmarshal ref="universalUnmarshallerToXML"/>
<!-- The input payload is always in XML -->
<choice >
<when>
<xpath>/order/customer/country = 'US'</xpath>
<to uri="file:test/output/us"/>
</when>
<when>
<xpath>/order/customer/country = 'UK'</xpath>
<to uri="file:test/output/uk"/>
</when>
<otherwise>
<to uri="file:test/output/others"/>
</otherwise>
</choice>
</route>
这个通用解组器是否存在(希望确实存在),还是我应该实现自己的解组器?
谢谢!