Tested on 2.2.0.M4
http://static.springsource.org/sprin...ce/htmlsingle/

Code:
<int:header-enricher input-channel="in" output-channel="out">
    <int:header name="foo" method="computeValue" ref="myBean"/>
</int:header-enricher>

<bean id="myBean" class="foo.bar.MyBean"/>
Code:
public class MyBean {
    public String computeValue(String payload){
        return payload.toUpperCase() + "_US";
    }
}

If my method argument (payload) is String, I got the following exception:

Code:
Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1004E:(pos 8): Method call: Method setBasicCredentials(org.springframework.util.LinkedMultiValueMap) cannot be found on com.bababa.haha.integration.http.ProfileRequestHandler type
        at org.springframework.expression.spel.ast.MethodReference.findAccessorForMethod(MethodReference.java:182)
        at org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:106)
        at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:57)
        at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:102)
        at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:102)
        at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:126)
        at org.springframework.integration.util.MessagingMethodInvokerHelper.processInternal(MessagingMethodInvokerHelper.java:227)
        at org.springframework.integration.util.MessagingMethodInvokerHelper.process(MessagingMethodInvokerHelper.java:127)

Don't know where LinkedMultiValueMap comes from.


Workaround:

The method argument being Message.