I’m using camel 2.16.2 and I’m finding the bean parameter binding doesn’t seem to work very well on overloaded methods. See below for an example
Here are the routes
And here are the tests
I don’t understand why test2Param_string and test2Param_classB throw ambiguous call exceptions. Here’s a sample stack trace.
From looking at the code in BeanInfo, I think it just tries to match the type on the body and if it sees multiple possible methods then it throws the exception. I believe it should go further and try to match the type on the other parameters as well?
To get around this issue temporarily, I’ve had to write an adapter class that wraps around ClassA but it’s not an ideal solution.