You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by as...@apache.org on 2007/05/22 06:58:17 UTC

svn commit: r540422 - in /webservices/synapse/trunk/java: repository/conf/sample/resources/script/stockquoteTransform.rb src/site/resources/Synapse_Samples_Setup.html

Author: asankha
Date: Mon May 21 21:58:17 2007
New Revision: 540422

URL: http://svn.apache.org/viewvc?view=rev&rev=540422
Log:
fix ruby sample and update docs on how to get the latest JRuby 1.0 RC2 to work with Synapse

Modified:
    webservices/synapse/trunk/java/repository/conf/sample/resources/script/stockquoteTransform.rb
    webservices/synapse/trunk/java/src/site/resources/Synapse_Samples_Setup.html

Modified: webservices/synapse/trunk/java/repository/conf/sample/resources/script/stockquoteTransform.rb
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/sample/resources/script/stockquoteTransform.rb?view=diff&rev=540422&r1=540421&r2=540422
==============================================================================
--- webservices/synapse/trunk/java/repository/conf/sample/resources/script/stockquoteTransform.rb (original)
+++ webservices/synapse/trunk/java/repository/conf/sample/resources/script/stockquoteTransform.rb Mon May 21 21:58:17 2007
@@ -30,8 +30,11 @@
 def transformResponse(mc)
   newResponse = Document.new '<m:CheckPriceResponse xmlns:m="http://www.apache-synapse.org/test"><m:Code>' <<
     '</m:Code><m:Price></m:Price></m:CheckPriceResponse>'
-  newResponse.root.elements[1].text = mc.getPayloadXML().root.elements[1].elements[1].get_text
-  newResponse.root.elements[2].text = mc.getPayloadXML().root.elements[1].elements[2].get_text
+  lastPrice=mc.getPayloadXML().root.elements[1].get_elements('ns:last')
+  code=mc.getPayloadXML().root.elements[1].get_elements('ns:symbol') 
+
+  newResponse.root.elements[1].text =code[0].get_text
+  newResponse.root.elements[2].text =lastPrice[0].get_text 
   mc.setPayloadXML(newResponse)
 end
 ]]></x>

Modified: webservices/synapse/trunk/java/src/site/resources/Synapse_Samples_Setup.html
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/src/site/resources/Synapse_Samples_Setup.html?view=diff&rev=540422&r1=540421&r2=540422
==============================================================================
--- webservices/synapse/trunk/java/src/site/resources/Synapse_Samples_Setup.html (original)
+++ webservices/synapse/trunk/java/src/site/resources/Synapse_Samples_Setup.html Mon May 21 21:58:17 2007
@@ -440,10 +440,10 @@
 
 <h4>Ruby support</h4>
 
-<p>For Ruby support you need to download JRuby and copy files in its 'lib'
-folder into the Synapse 'lib' folder (this includes all jar files as well as
-the 'ruby' subfolder). JRuby ver 0.9.9 can be downloaded from <a
-href="http://dist.codehaus.org/jruby">here</a>.</p>
+<p>For Ruby support you need to download the 'jruby-complete.jar' from the
+Maven repository for JRuby, and copy it into the 'lib' folder of Synapse . The
+JRuby JAR can be downloaded from <a
+href="http://repo1.maven.org/maven2/org/jruby/jruby-complete/">here</a>.</p>
 
 <p></p>
 </body>



---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org