我正在从队列中路由消息-> 使用 xslt 将其转换并将其转发到另一个队列,记录。
我的骆驼配置如下:
<camelContext xmlns="http://camel.apache.org/schema/spring"
streamCache="true">
<route>
<from uri="jms:queue:TradeEventsToESBQueue" />
<multicast>
<to uri="xslt:com/tpt/esb/tradeevent/confirmation.xsl" />
<to uri="xslt:com/tpt/esb/tradeevent/valuation.xsl" />
</multicast>
</route>
<route>
<from uri="xslt:com/tpt/esb/tradeevent/confirmation.xsl" />
<to uri="log:output?showAll=true" />
</route>
<route>
<from uri="xslt:com/tpt/esb/tradeevent/valuation.xsl" />
<to uri="jms:queue:TradeValuationStartQueue1?jmsMessageType=Text" />
<to uri="log:output?showAll=true" />
</route>
</camelContext>
在运行程序时,我收到以下错误:
原因:org.apache.camel.ExpectedBodyTypeException:无法将 IN 消息正文提取为类型:接口 javax.xml.transform.Source 正文为:org.apache.camel.builder.xml.XsltBuilder.getSource(XsltBuilder.java :482)[64:org.apache.camel.camel-core:2.10.1] 在 org.apache.camel.builder.xml.XsltBuilder.process(XsltBuilder.java:125)[64:org.apache.camel.骆驼核心:2.10.1] 在 org.apache.camel.impl.ProcessorPollingConsumer.receive(ProcessorPollingConsumer.java:58)[64:org.apache.camel.camel-core:2.10.1]
任何想法是什么导致了这个问题?