Look at simple http://camel.apache.org/simple
On Thu, Jan 19, 2017 at 11:49 AM, santoshkeleti <[email protected]> wrote: > hi All, > > I have a situation where i have a header of type Map. based on the value of > key=3 i need to route the massage to different URIs. > i.e. > from("file:/home/santoshkeleti/Desktop/Camel/input?noop=true") > .to("http://"+conncterURL+"iso/parse?isoMsg="+iso).process(new Processor() > { > @Override > public void process(Exchange exchange) throws > Exception { > map=exchange.getIn().getBody(String.class); > exchange.getIn().setHeader("map", map); > exchange.getIn().setHeader("isoMap", new > GsonBuilder().create().fromJson(map, Map.class)); > } > }).choice() > .when(((Map)header("isoMap")).gety(3).equals("21300") > > .toD("http://localhost:8080/CBS/iso/fundTransferISO?isoMsgMap=${header.map}"); > > > But i am getting Error like can not cast valueBuilder to map. > > Please provide me a solution. please > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/How-to-read-header-of-type-java-Map-in-choice-block-tp5792774.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
