Hi Ranx,
Thanks. I was able to send a Map object to the body using bean.

Converter class:
public Map<String,Object> myConverter(String toDisplay) 
        { 
                logger.debug("Invoking my converter for type
"+toDisplay.getClass().getName()+" toDisplay "+toDisplay); 
                Gson gson = new Gson();
                Type mapType = new TypeToken<Map&lt;String, 
Object>>(){}.getType();
                Map<String,Object> requiredData = gson.fromJson(toDisplay, 
mapType);
                logger.debug("Output from converter: "+requiredData);
                return requiredData; 
        } 

PropertiesMap:
final Map<String,String> propertiesMap = new HashMap<String,String>();
                        propertiesMap.put("EmpId", "23456");

Route:
from("quartz2://sampleGroup/sampleTimer?trigger.repeatCount=1")
                                        .routeId("scheduler").noAutoStartup()
                                        .setBody(new 
SimpleExpression(propertiesMap.toString()))
                                        .bean(new QuartzStandaloneTest(), 
"myConverter") 
                                        .to("direct:hivein");

Thanks,
Vinoth.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-route-set-map-object-in-body-tp5780863p5780880.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to