I'm trying to use Python with spring-integration and jython-standalone-2.7.0:
Here is my application context:
<int:inbound-channel-adapter id="in" channel="exampleChannel" > <int:poller fixed-rate="1000" /> <int-script:script lang="python" location="script/message.py" /> </int:inbound-channel-adapter> <int:channel id="exampleChannel" /> <int-ip:udp-outbound-channel-adapter id="udpOut" channel="exampleChannel" host="192.168.0.1" port="11111" />
Here is my script in Python:
print "Python" message="python-message"
When I start the application, I see "Python" in the console. This must mean that my script is launched by spring-integration but nothing is sent in udp.
I see in the code that in
result = scriptEngine.eval(script, new SimpleBindings(variables));
All the Python variables are in the Map variables and scriptEngine contains no reference to Python variables.
It returns null.
Is it a problem in Jython, in Spring-integration or may be I'm doing something wrong?