How to pass arguments in exchange

来源:互联网 发布:淘宝网纸箱 编辑:程序博客网 时间:2024/05/18 08:10

we can use exchange.getIn().setHeader() only when we don't call exchange.getOute().setBody(), otherwise

if we set exchange.getOut().setBody, then the header will miss.
exchange.getOut().setBody(outFileName+":"+commandStr);

so we replace ex.getIn().setHeader(); to
ex.setProperty();