Apache Camel: how store variable for later use

前端 未结 2 955
情话喂你
情话喂你 2021-02-07 05:27

while \'playing around\' with Camel using Spring DSL, I came across the following problem. Suppose the expected message flow looks like this:

  1. client sends HTTP POS
2条回答
  •  臣服心动
    2021-02-07 05:34

    I leave you some examples:

    
        someValue
    
    
    
        ${properties:userName}  //from config
    
    
    
        ${in.body}
    
    
    
        //item[1]/orderNumber/text()
    
    

    Getter

    ${exchangeProperty[orderNumber]}
    
    ${in.headers.token}
    

    Documentation

    Check the simple expression language: http://camel.apache.org/simple.html

    Sometimes looking at the test cases of Camel can be helpful as well, in particular for Spring DSL:

    • setProperty with Spring DSL
    • setHeader using XPATH with Spring DSL
    • simple expression language test

提交回复
热议问题