Hi,

We're hitting a bit peculiar Camel problem.

We have our Camel route defined like this:
<bean id="enricher" class="SomeBean"/>

  <camelContext id="camelContext" useJmx="true"
xmlns="http://activemq.apache.org/camel/schema/spring";>

  <route>
        <from uri="jbi:service:Notification"/> <!-- the "sender" endpoint,
e.g. a file poller -->
        <bean ref="enricher" method="processExchange"/>
        <to uri="jbi:service:Test" />           
 </route>


So in practice what we want to do is to "enrich" the message before
giving it to another component.

For some reason the call to our enricher bean fails with this message:
org.apache.camel.component.bean.AmbiguousMethodCallException:
Ambiguous method invocations possible: [public static void
SomeBean.print(javax.xml.transform.Source), public void
SomeBean.setDbServiceName(java.lang.String)] on the exchange:
Exchange[JbiMessage:
org.apache.servicemix.jbi.messaging.normalizedmessagei...@dbe4e5]

Does this mean that what ever message we're passing is actually a
String object and thus Camel is trying to select a suitable void
xxx(String arg) type of method? As we have the method defined in the
route, why is Camel overriding it?

Our processing method signature is:
public void processExchange(org.apache.camel.Exchange exchange);

Any help appreciated.


Cheers,
- Jussi -

Reply via email to