Dear Claus, I'm using the latest camel version:
<dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-spring-ws</artifactId> <version>2.13.2</version> </dependency> I have already tried using that log line this way: <camel:recipientList> <camel:constant>exec://echo?args=-f -g FONDO -h 192.168.10.77 -u admin -p password /tmp/ID-MacBook-Pro-de-Gonzalo-Vasquez-local-64241-1408030173940-0-1</camel:constant> <!-- <camel:simple> exec://{{cmod.arsLoad}}?args=-f -g ${in.header.appGroup} -h {{cmod.host}} -u {{cmod.username}} -p {{cmod.password}} {{tmp.path}}/${id}</camel:simple> --> </camel:recipientList> <camel:to uri="log:org.apache.camel.example?showAll=true&multiline=true" /> and the output is like this: And the output is like this: 2014-08-14 13:02:04,789 INFO [example ] - Exchange[ , Id: ID-MacBook-Pro-de-Gonzalo-Vasquez-local-49167-1408035712756-0-7 , ExchangePattern: InOptionalOut , Properties: {CamelCorrelationId=ID-MacBook-Pro-de-Gonzalo-Vasquez-local-49167-1408035712756-0-7, CamelCreatedTimestamp=Thu Aug 14 13:02:04 CLT 2014, CamelMessageHistory=[DefaultMessageHistory[routeId=route1, node=multicast1], DefaultMessageHistory[routeId=route1, node=to3], DefaultMessageHistory[routeId=route4, node=to6], DefaultMessageHistory[routeId=route4, node=setHeader3], DefaultMessageHistory[routeId=route4, node=doTry1], DefaultMessageHistory[routeId=route4, node=recipientList3], DefaultMessageHistory[routeId=route4, node=to7]], CamelMulticastComplete=true, CamelMulticastIndex=0, CamelRecipientListEndpoint=exec://echo?args=-f+-g+FONDO+-h+192.168.10.77+-u+admin+-p+password+%2Ftmp%2FID-MacBook-Pro-de-Gonzalo-Vasquez-local-49167-1408035712756-0-1, CamelToEndpoint=log://org.apache.camel.example?multiline=true&showAll=true, isXalanTransformer=false, TryRouteBlock=true} , Headers: {appGroup=FONDO, breadcrumbId=ID-MacBook-Pro-de-Gonzalo-Vasquez-local-49167-1408035712756-0-1, CamelSpringWebserviceSoapHeader=javax.xml.transform.dom.DOMSource@5393973d} , BodyType: String , Body: FONDO , Out: null: ] But when it is after the to / exec (no receipientList): <camel:to uri="exec://echo?args=-f -g FONDO -h 192.168.10.77 -u admin -p password /tmp/ID-MacBook-Pro-de-Gonzalo-Vasquez-local-64241-1408030173940-0-1" /> <camel:to uri="log:org.apache.camel.example?showAll=true&multiline=true" /> I do get the correct headers: 2014-08-14 13:02:04,808 INFO [example ] - Exchange[ , Id: ID-MacBook-Pro-de-Gonzalo-Vasquez-local-49167-1408035712756-0-7 , ExchangePattern: InOptionalOut , Properties: {CamelCorrelationId=ID-MacBook-Pro-de-Gonzalo-Vasquez-local-49167-1408035712756-0-7, CamelCreatedTimestamp=Thu Aug 14 13:02:04 CLT 2014, CamelMessageHistory=[DefaultMessageHistory[routeId=route1, node=multicast1], DefaultMessageHistory[routeId=route1, node=to3], DefaultMessageHistory[routeId=route4, node=to6], DefaultMessageHistory[routeId=route4, node=setHeader3], DefaultMessageHistory[routeId=route4, node=doTry1], DefaultMessageHistory[routeId=route4, node=recipientList3], DefaultMessageHistory[routeId=route4, node=to7], DefaultMessageHistory[routeId=route4, node=to8], DefaultMessageHistory[routeId=route4, node=to9]], CamelMulticastComplete=true, CamelMulticastIndex=0, CamelRecipientListEndpoint=exec://echo?args=-f+-g+FONDO+-h+192.168.10.77+-u+admin+-p+password+%2Ftmp%2FID-MacBook-Pro-de-Gonzalo-Vasquez-local-49167-1408035712756-0-1, CamelToEndpoint=log://org.apache.camel.example?multiline=true&showAll=true, isXalanTransformer=false, TryRouteBlock=true} , Headers: {appGroup=FONDO, breadcrumbId=ID-MacBook-Pro-de-Gonzalo-Vasquez-local-49167-1408035712756-0-1, CamelExecExitValue=0, CamelExecStderr=null, CamelSpringWebserviceSoapHeader=javax.xml.transform.dom.DOMSource@5393973d} , BodyType: org.apache.camel.component.exec.ExecResult , Body: -f -g FONDO -h 192.168.10.77 -u admin -p password /tmp/ID-MacBook-Pro-de-Gonzalo-Vasquez-local-64241-1408030173940-0-1 , Out: null: ] Just also tried switiching the endpoint from simple language to a plain constant, to check, but same problem: <camel:constant>exec://echo?args=-f -g FONDO -h 192.168.10.77 -u admin -p password /tmp/ID-MacBook-Pro-de-Gonzalo-Vasquez-local-64241-1408030173940-0-1</camel:constant> Regards, Gonzalo Vásquez Sáez Gerente Investigación y Desarrollo (R&D) Altiuz Soluciones Tecnológicas de Negocios Ltda. Av. Nueva Tajamar 555 Of. 802, Las Condes - CP 7550099 +56 2 335 2461 gvasq...@altiuz.cl http://www.altiuz.cl http://www.altiuzreports.com El 14-08-2014, a las 13:55, Claus Ibsen <claus.ib...@gmail.com> escribió: > Hi > > What camel version do you use? > > And can you try add something after recipient list, such as > > <to uri="log:foo?showAll=true"/> > > And see if you have the header now, > > On Thu, Aug 14, 2014 at 6:18 PM, Gonzalo Vasquez <gvasq...@altiuz.cl> wrote: >> Hi there! >> >> Experimenting with the exec endpoint I found out that it works perfectly >> (setting CamelExecExitValue header) when invoked with hardcoded args, such >> as: >> >> <camel:to uri="exec:///opt/ibm/ondemand/V9.0/bin/arsload?args=-f -g FONDO -h >> 192.168.10.77 -u admin -p password >> /tmp/ID-MacBook-Pro-de-Gonzalo-Vasquez-local-64241-1408030173940-0-1" /> >> >> >> >> But fails silently on setting headers (CamelExecExitValue not set, and blank >> body )when invoked as a receipientList endpoint, with variable parameters >> such as: >> >> <camel:recipientList> >> <camel:simple> >> exec://{{cmod.arsLoad}}?args=-f -g >> ${in.header.appGroup} -h {{cmod.host}} -u {{cmod.username}} -p >> {{cmod.password}} {{tmp.path}}/${id}</camel:simple> >> </camel:recipientList> >> >> >> I actually need to use the second approach as the arguments to my command >> are determined in runtime. >> >> Am I doing something wrong or the recipientList actually removed the >> expected headers? >> >> >> PS: This is derived from my previous post at >> http://camel.465427.n5.nabble.com/Retrieving-EXEC-EXIT-VALUE-from-exec-endpoint-td5755188.html >> >> Regards, >> >> Gonzalo Vasquez > > > > -- > Claus Ibsen > ----------------- > Red Hat, Inc. > Email: cib...@redhat.com > Twitter: davsclaus > Blog: http://davsclaus.com > Author of Camel in Action: http://www.manning.com/ibsen > hawtio: http://hawt.io/ > fabric8: http://fabric8.io/