Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Transform, Camel and null message bodies

$
0
0
Hello all!

In this specific application of Camel, we have the requirement of writing as
much as possible message processing code in Python/Jython.

This took me to <transform> and <python>. The solution would look like (we
are using Camel 2.12.1 and Jython 2.5.3):

...
<tranform>
<python>resource:classpath:transformation.py</python>
</transform>
...

The Jython code would look like, for example:

request.headers['MyHeader']='Something'

The problem is that the routes are failing saying that the body is null
after the transformation. If I add the line response.body=request.body to
the Jython script, the compilation fails saying that the name 'response' is
not defined.

I searched as much as I could but I couldn't find a solution to the problem.
Could any of you help me please?

Thank you very much for your attention, regards,

AP

Viewing all articles
Browse latest Browse all 5648

Trending Articles