camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: How to read header of type java Map in choice block
Date Thu, 19 Jan 2017 11:43:22 GMT
Something a like:

when(simple("${header[isoMap].getY()} == '213000'"))



On Thu, Jan 19, 2017 at 12:39 PM, santoshkeleti
<keleti.santhosh@gmail.com> wrote:
> Thanks bro,
>
> just i have tried simple but did not worked for me, may be i did some thing
> wrong.
> i am new to camel.
>
> 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(PredicateBuilder.constant(simple("${in.header.isoMap[\"3\"]").equals("213000")))
>
> .toD("http://localhost:8080/CBS-Connector-0.0.1-SNAPSHOT/service/iso/fundTransferISO?isoMsgMap=${header.map}&"+"suspenseAccount="+suspenseAccount)
>
>
> help me. i have a assignment to complete. i am just following camel in
> Action book. but i dont have time read complete book that y i am asking
> help.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-read-header-of-type-java-Map-in-choice-block-tp5792774p5792799.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

Mime
View raw message