Dims, First of all sorry for the late,
I got jython to work, (but I don't have much knowledge on python to write the transformation script as in ruby case) with a simple print inside the script. Here are the steps that you need to do to get it running (Simple and straight forward :D) 1. download the jython-2.2.jar from http://repo1.maven.org/maven2/org/python/jython/2.2/ and put that in to the lib directory of the extracted synapse distribution. 2. add the python script stockquoteTransform.py to the repository/conf/sample/resources/script folder (attached) 3. use the synapse configuration attached to start synapse 4. deploy the SimpleStockQuoteService in the sample axis2 server 5. invoke the sample client using the following ant command "ant stockquote -Dtrpurl=http://localhost:8080/" you can see the synapse console for the print commands executed in the script. Dims, can you try this and let me know of any issues???? Thanks, Ruwan. On 9/14/07, Ruwan Linton <[EMAIL PROTECTED]> wrote: > > Dims, > > On 9/14/07, Davanum Srinivas <[EMAIL PROTECTED]> wrote: > > > > Ruwan, > > > > Any idea about jython? > > > I never tried jython. Let me try to run jython over the weekend and get > back to you on Monday. > > Thanks, > Ruwan > > -- dims > > > > On 9/13/07, Ruwan Linton <[EMAIL PROTECTED]> wrote: > > > Dims, > > > > > > > > > On 9/14/07, Davanum Srinivas < [EMAIL PROTECTED]> wrote: > > > > Team, > > > > > > > > FYI, latest JRuby (1.0.1) is not working because of this issue: > > > > https://scripting.dev.java.net/issues/show_bug.cgi?id=16 > > > > > > I have experienced this when trying to integrate the samples as test > > cases. > > > Will try to fix this for the next release (1.1) > > > > > > Thanks, > > > Ruwan > > > > > > > Has anyone tried jython? say by "port" say the Sample 503 from jruby > > to > > > jython? > > > > > > > > thanks, > > > > dims > > > > > > > > -- > > > > Davanum Srinivas :: http://davanum.wordpress.com > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: > > > [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > -- > > > Ruwan Linton > > > http://www.wso2.org - "Oxygenating the Web Services Platform" > > > > > > -- > > Davanum Srinivas :: http://davanum.wordpress.com > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Ruwan Linton > http://www.wso2.org - "Oxygenating the Web Services Platform" > -- Ruwan Linton http://www.wso2.org - "Oxygenating the Web Services Platform"
<x><![CDATA[ from org.apache.axiom.om import OMElement def transformRequest(mc): print "**************** This is inside the python script ****************" print "todo: need to transform the request using python, request payload is -" print mc.getPayloadXML() print "**************** End of the function transformRequest ************" def transformResponse(mc): print "**************** This is inside the python script ****************" print "todo: need to transform the response using python, response payload is -" print mc.getPayloadXML() print "**************** End of the function transformResponse ************" ]]></x>
<definitions xmlns="http://ws.apache.org/ns/synapse"> <localEntry key="stockquoteScript" src="file:repository/conf/sample/resources/script/stockquoteTransform.php"/> <in> <!-- transform the custom quote request into a standard quote request expected by the service --> <script language="py" key="stockquoteScript" function="transformRequest"/> <!-- send message to real endpoint referenced by name "stockquote" and stop --> <send> <endpoint name="stockquote"> <address uri="http://localhost:9000/soap/SimpleStockQuoteService"/> </endpoint> </send> </in> <out> <!-- transform the standard response back into the custom format the client expects --> <script language="py" key="stockquoteScript" function="transformResponse"/> <send/> </out> </definitions>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]