2
CXF 끝점에서 SOAP 메시지를 검색 한 다음이를 XML 파일로 디렉터리로 라우팅하는 콘텐츠 기반 라우터로 보내려고합니다. 낙타 콘텐츠 기반 라우터 XPath 비어있는 비누가 반환되었습니다.
이
내 낙타 컨텍스트에서 경로입니다 :<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>
내용 기반 라우터가 잘 작동하지만, 디렉토리에 빈 XML 파일을 전송하고 내 SOAP 메시지가 사라졌다.
CXF 엔드 포인트 대신 디렉토리에서 SOAP 메시지를 받으면 제대로 작동합니다. 나는 한 경우 :
<from uri="file:target/messages/incoming"/>
대신에 :
<from uri="cxf:bean:reportIncident?dataFormat=MESSAGE"/>
어떤 아이디어 왜?
감사합니다.
좋습니다. 왜 그런지 알아 냈습니다. 스트림 유형은 한 번만 읽을 수 있습니다. 메시지 내용을 여러 번 사용할 수 있으려면 스트림을 캐싱해야합니다. 그렇게하려면에 streamCache = "true"를 추가하십시오. 자세한 내용은 http://camel.apache.org/stream-caching.html을 참조하십시오. –
Graham