On 03/03/2008, georgiosgeorgiadis <[EMAIL PROTECTED]> wrote:
>
>  Hello everybody,
>
>  Currently I exprerience the following:
>
>  I have a class which defines a method:
>
>  public class MyClass implements java.io.Serializable{
>
>   public Object getMyObject(String para1, Object param2, int param3, String
>  param4){
>     .......
>   }
>
>  }
>
>  I am able to bind it to the camel context but my router complains if i try
>  to forward via:
>
>  from("direct:mycall").to("bean:MyClass?method=getMyObject");
>
>  With methods with only one parameter it does really work, passing everything
>  to the method.
>  But When the method has more than one params, it complains with:
>
>  java.lang.IllegalStateException: No method invocation could be created, no
>  maching method could be found on: [EMAIL PROTECTED]
>
>  Any ideas or suggestions on how can I call this method will be much
>  appreciated.

So you could map the parameters to expressions on the message; e.g.
you could map parameters to message headers; or XPath expressions or
whatever by adding annotations to the parameters (@XPath, @Header or
whatever).
http://activemq.apache.org/camel/bean-integration.html

Or if you want to write Java code, you could write a converter which
turns your bean into a Processor which can then decide how to take a
message Exchange object and construct the individual parameter values.


-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

Reply via email to