camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Dudgeon <>
Subject Re: Return Value from Python Script Not In Message Body
Date Sun, 29 Jun 2014 15:09:25 GMT
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.


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message