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.

Reply via email to