Hi You cannot do this > .to("bean://myclass?method=myFonction(${mymap})")*
This is just a string. Also mind that ${ } is also groovy gstrings, so it may conflict and groovy want to do string interpolation as its a gstring. If you want to call a method named myFonction, and pass in that mymap as parameter. Then you need to store the mymap in the Camel registry. And then refer to it by its id using the ref function from simple language: http://camel.apache.org/simple > .to("bean://myclass?method=myFonction(${ref:idOfTheMap})")* And read about registry here http://camel.apache.org/registry.html On Tue, Apr 30, 2013 at 10:12 AM, Bovas <bovas.t...@gmail.com> wrote: > Hi > > I use the Groovy DSL, Apache Camel 2.11.0. > I have a problem when I put a Map or a List in parameters in a bean. > > I declared à map : > *def mymap= [:] > mymap["Mode"]="Zip" > mymap["test"]="test"* > > my route : > *from("file://path") > .to("bean://myclass?method=myFonction(${mymap})")* > > how looks my fonction in my class /myclass/ > I just display the values of my map : > *public void myFonction(def mymap){ > println mymap > }* > > When i display my map before the method myFonction, it displays : > [Mode:Zip, test:test] > > but when i displays in the call of my method, it displays : > [Mode:Zip > > I don't understand, maybe the comma makes the error. > > I already try differents ways : > .bean(new Myclass(),"myFonction(${mymap})") > myFonction("+mymap+") > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/bean-collections-in-parameters-groovy-tp5731778.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen