Re: Camel route set map object in body

2016-04-10 Thread VinothKR
Hi Ranx, Thanks. I was able to send a Map object to the body using bean. Converter class: public Map myConverter(String toDisplay) { logger.debug("Invoking my converter for type "+toDisplay.getClass().getName()+" toDisplay "+toDisplay); Gson gson = new Gs

Re: Camel route set map object in body

2016-04-10 Thread Brad Johnson
I gathered you wanted to send a map of data and not the quartz data. What wasn't clear from your code snippet is where the bodyMap was coming from. I'm not sure why you are calling toString on the bodyMap in your SimpleExpression and then calling convertToMap after it. Isn't it already the map yo

Re: Camel route set map object in body

2016-04-09 Thread VinothKR
Hi Ranx, Thanks for the response. I will not be able to pass any object type other string to setBody or simpleExpression methods. I just want to pass a dynamic value to the route. The message i'm getting is, Message History ---

Re: Camel route set map object in body

2016-04-09 Thread Brad Johnson
By the way, when the quartz timer fires what are you expecting that data to be in the bodyMap? Is that just an instance variable at that point? Perhaps if you posted the complete code it would make that a bit clearer. >From what I can see of your route snippet I'd expect some quartz timer event to

Re: Camel route set map object in body

2016-04-09 Thread Brad Johnson
.setBody(new SimpleExpression(bodyMap.toString())) .convertBodyTo(Map.class) Aren't you converting the object twice? First to a String and then telling it to convert the String to a Map (which it doesn't know how to handle)? bodyMap.toString(). Assuming it doe