I use MULE version 3.3.0 CE, I want to get some value from header in inbound and then pass it to a java method, in java method making some changes on passed value, finally again I pass it from java method to the outbound????
解决方案
Instead of tying your Java beans to the Mule API (with Callable), you can do this using MEL only, for example with:
method="yourMethod"
methodArguments="#[message.inboundProperties['inboundPropertyName']]" />
value="#[payload]" />
This has the caveat that the message payload is affected by the invoke element. If this is a problem then you can go with:
propVal = app.registry.yourBean.yourMethod(message.inboundProperties['inboundPropertyName']);
message.outboundProperties['outboundPropertyName'] = propVal;