Hi I am not sure we understand exactly your question. The message body is set to a fixed String value of param-1, and then you want to call an EJB. What is the EJB method signature?
And EJB can be called from regular Java so you can always just let Camel call a bean / processor, and from there you can call your EJB if something is complex. On Thu, Aug 26, 2021 at 5:16 PM Mansour Al Akeel <[email protected]> wrote: > > I am not sure if there is missing information preventing this question > from getting an answer. > > On Wed, 25 Aug 2021 at 12:08, Mansour Al Akeel > <[email protected]> wrote: > > > > We have a legacy system that we are trying to integrate with. The > > system is composed of EJB 3.0 > > > > Things are fine when calling an ejb method with no arguments. However, > > I am unable to invoke methods with parameters. > > > > The documentation for EJB component > > https://camel.apache.org/components/2.x/ejb-component.html states > > that, we can use "parameters" as query parameters, and type is Map. > > Which is a bit confusing. > > > > So starting with something like: > > > > <camel:route id="ejbRoute"> > > <camel:from uri="timer:ejbTimer?period=1000" /> > > <camel:setBody> > > <camel:simple>param-1</camel:simple> > > </camel:setBody> > > <camel:to > > uri="ejb:java:global/app/ejbName?method=myMethod" /> > > <camel:log message="[Results] ===> ${body}" /> > > </camel:route> > > > > What is the correct way to pass multiple parameters to a method ? > > > > I am using camel-ejb-2.25.3 > > > > Thank you in advance -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
