我從隊列中路由消息 - >使用xslt轉換它並將其轉發到另一個隊列日誌。駱駝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>
在運行該程序,我收到以下錯誤:
Caused by: org.apache.camel.ExpectedBodyTypeException: Could not extract IN message body as type: interface javax.xml.transform.Source body is: null at org.apache.camel.builder.xml.XsltBuilder.getSource(XsltBuilder.java:482)[64:org.apache.camel.camel-core:2.10.1] at org.apache.camel.builder.xml.XsltBuilder.process(XsltBuilder.java:125)[64:org.apache.camel.camel-core:2.10.1] at org.apache.camel.impl.ProcessorPollingConsumer.receive(ProcessorPollingConsumer.java:58)[64:org.apache.camel.camel-core:2.10.1]
任何想法是什麼原因造成這個問題?
非常感謝,這工作。 – ABose