I'm not sure on the "proper" way to do it, but what I'd do is write a
Processor or similar in Jython for more complex Python scripts.


On 29 June 2014 10:09, Tim Dudgeon <tdudgeon...@gmail.com> wrote:

> I'd like to follow up on this as I've just hit the same issue. I know this
> thread dates from a year and a half ago, but it seems unanswered.
>
> The issue is that if you are using a Python script using the language
> component, it works fine if the script is a  one line piece of text. e.g.
> the whole script is this:
>
> "Hello World!"
>
> In that case the return value of the script, and so what get's set to the
> message body is "Hello World!".
> But if its anything more complex like:
>
> val = 1 + 2
> "Hello World!"
>
> then the return value from the script is null.
> I did find a workaround - set the return value to the request.body property
> in the Python script, and use the transform=false attribute for the
> language
> component URL. But was wondering what the way to get a multi-line script
> working correctly was.
>
> Tim
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Return-Value-from-Python-Script-Not-In-Message-Body-tp5724056p5753009.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Matt Sicker <boa...@gmail.com>

Reply via email to