Hi All,

 

I have code in groovy to create a ProducerTemplate  and pass the header
value .
Below is the code snippet:

template.requestBodyAndHeader("direct:aa",null,"ab",start,JSONArray);

ab is header string'
start is the header value
So while creating the route 

                public void configure() {
                    from("direct:soaid")
                        .setHeader(Exchange.HTTP_URI,
simple("${header.ab}"))
                        .to(HttpUrlConstants.HTTP_DUMMY_HOST);
                }

Now when i move to java code 

template.requestBodyAndHeader("direct:aa",null,"ab",zip,JSONArray.class);

i want to set the header value ,how can be set the same in java?




          






--
View this message in context: 
http://camel.465427.n5.nabble.com/Setting-Header-Value-in-java-tp5747179.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to