camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sri <sri.tec...@googlemail.com>
Subject setting headers in destination endpoint for exec
Date Thu, 28 Oct 2010 12:05:48 GMT

Hello All,

I am using camel-exec for to execute a java command. 

 version I am using are 

Camel 2.5-SNAPSHOT and 
JDK1.6 ver

my requirement is set the parameters in the route from the headers I am
getting from end point.

following is the route i am using .

from("direct:titan")
.to("exec:java?workingDir="+<getFromHeader()>+"&useStderrOnEmptyStdout=true&args=-jar
Titan.jar "+getFromHeader() )
				.process(new Processor() {
				     public void process(Exchange exchange) throws Exception {
				       String processOutput = (String)
exchange.getIn().getBody(String.class);
				       Integer exitCode = (Integer)
exchange.getIn().getHeader(ExecBinding.EXEC_EXIT_VALUE, Integer.class);
				       logger.info(processOutput);
				       logger.info("Exit code: " + exitCode);


I need to pass the highlighted part from the headers.


is there any way that I can send these parameters dynamically I mean
creating the destination end point string dynamically.


thanks in advance for your suggestions.

Regards
Sri





 
-- 
View this message in context: http://camel.465427.n5.nabble.com/setting-headers-in-destination-endpoint-for-exec-tp3240403p3240403.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message