我们有一个自定义的骆驼处理器,需要从传入的请求有效负载 xpath 中动态调用和参数化,但是处理器的 URI 包含“COMMA”,因为它在内部进行 SQL 查询
<context id="mycontext">
<from uri="timer://com.arpit.timer?period=1000&delay=1000&repeatCount=5&fixedRate=false&daemon=false"/>
<setBody>
<simple> "here goes sample XML payload "</simple>
</setBody>
<setheader headerName="val1">
<xpath resultType="java.lang.String"> "here goes my xpath" </xpath>
</setheader>
<!-- Now I call my custom processor with URI containing comma -->
<recipientList delimiter="%">
<simple>Select col1, col2, col3 from tablex where id = '${header.val1}'</simple>
</recipientList>
</context>
现在该方案仅在我们给出delimiter="%"时才有效,否则,它会失败并出现关于无法找到端点 col2 的错误。
有没有办法抑制 RECIPIENT LIST 中的分隔符?
问候,阿皮特。