返回基于内容的Camel路由器XPath空soap
我试图从CXF端点检索SOAP消息,然后将其发送到基于内容的路由器,该路由器将作为XML文件路由到目录 这是我的骆驼环境中的路线:返回基于内容的Camel路由器XPath空soap,soap,cxf,apache-camel,Soap,Cxf,Apache Camel,我试图从CXF端点检索SOAP消息,然后将其发送到基于内容的路由器,该路由器将作为XML文件路由到目录 这是我的骆驼环境中的路线: <route> <from uri="cxf:bean:reportIncident?dataFormat=MESSAGE"/> <choice> <when> <xpath>/*/*/*[local-name()='inputReportIncide
<route>
<from uri="cxf:bean:reportIncident?dataFormat=MESSAGE"/>
<choice>
<when>
<xpath>/*/*/*[local-name()='inputReportIncident']/*[local-name()='familyName']='Holt'</xpath>
<to uri="file:target/messages/contentbasedrouting/a?fileName=a.xml"/>
</when>
<otherwise>
<to uri="file:target/messages/contentbasedrouting/otherwise?fileName=otherwise.xml"/>
</otherwise>
</choice>
</route>
/*/*/*[local-name()='inputrepartincident']/*[local-name()='familyName']='Holt'
基于内容的路由器工作正常,但它向目录发送一个空白XML文件,我的SOAP消息就消失了
如果我从一个目录而不是一个CXF端点获取SOAP消息,它就可以正常工作。如果我这样做了:
<from uri="file:target/messages/incoming"/>
而不是:
<from uri="cxf:bean:reportIncident?dataFormat=MESSAGE"/>
你知道为什么吗
谢谢是的,该播放了。请参阅此常见问题解答:好的,我找到了原因。流类型只能读取一次。为了能够多次处理消息内容,需要缓存流。为此,将streamCache=“true”添加到。有关更多信息,请参阅。