You can add a processor to set the ExecResult into the response object as you 
want.
Current camel-cxfrs doesn't have the write provider to do the marshal job as 
you want.

-- 
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
          http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang 
Weibo: willemjiang





On Thursday, October 25, 2012 at 11:57 PM, wagner wrote:

> 
> Hi camel riders,
> 
> 
> I have been used this folowing kind of route sucessfully for a wile:
> 
> 
> 
> <cxf:rsServer id="rsServer" address="http://localhost:9090/batch";
> 
> serviceClass="br.edu.fzlbpms.template.camel.batch.impl.ControllerService"/>
> 
> <camelContext xmlns="http://camel.apache.org/schema/spring";>
> 
> <route id="control">
> <from uri="cxfrs:bean:rsServer"/>
> <to
> uri="exec:/run/media/wagner/fzlbpms_env/PROGSATIVOS/fzlbpms/bin/myShellScript.sh
>  (http://myShellScript.sh)"/>
> (...)
> 
> 
> In the shellscript field, to return a non zero code (eg: "exit 404") is used
> to send a error code to the caller witch could access this error code
> getting its value in $ variable.
> 
> My desire is to put this "error code" (returned from exit instruction of
> myShellScript.sh (http://myShellScript.sh)) in the rest response and 
> interpret it in my browser app.
> So, how could I achieve this?
> 
> PS: An aditional information: the returned message received from script is: 
> "No message body writer has been found for response class ExecResult."
> but I could not figure out how to counstruct this type of result.
> 
> 
> best regards!!!!
> 
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://servicemix.396122.n5.nabble.com/How-to-set-a-what-my-shellscript-return-in-a-rest-response-tp5714779.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com 
> (http://Nabble.com).



Reply via email to