You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by davsclaus <ci...@yahoo.dk> on 2011/01/04 16:21:22 UTC
Re: camel file :getName of file
You need to use the recipient list pattern when the endpoint is dynamically.
So instead of to use recipientList.
http://camel.apache.org/recipient-list.html
--
View this message in context: http://camel.465427.n5.nabble.com/camel-file-getName-of-file-tp3322455p3327193.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel file :getName of file
Posted by "v.detez@gmail.com" <v....@gmail.com>.
Here is the solution :
from("file://entree?delete=true")
.process(new Processor() {
public void process(Exchange exchange) throws Exception {
Map<String,Object> a= exchange.getIn().getHeaders();
String namefile = (String)a.get("camelfilenameonly");
namefile = namefile.substring(0,namefile.indexOf("."));
System.out.println(namefile);
String newEndpoint =
"exec:c:/python25/python.exe?args=c:/python25/stepIIS/stepIIS.py
c:/python25/stepIIS/"+namefile+".step -n -l 3";
Exchange e =
exchange.getContext().createProducerTemplate().send(newEndpoint,exchange);
String res = e.getIn().getBody(String.class);
System.out.println(res);
}});
thks for your help
Valery
--
View this message in context: http://camel.465427.n5.nabble.com/camel-file-getName-of-file-tp3322455p3330732.html
Sent from the Camel - Users mailing list archive at Nabble.com.