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/04/26 10:35:27 UTC

svn commit: r532660 - in /webservices/synapse/trunk/java: modules/samples/src/main/java/samples/userguide/ modules/samples/src/main/scripts/ src/site/resources/

Author: asankha
Date: Thu Apr 26 01:35:26 2007
New Revision: 532660

URL: http://svn.apache.org/viewvc?view=rev&rev=532660
Log:
enhance client to work on windows SYNAPSE-88

Added:
    webservices/synapse/trunk/java/src/site/resources/Synapse_Samples_Setup.html
      - copied, changed from r532369, webservices/synapse/trunk/java/src/site/resources/new_Synapse_Samples.html
Removed:
    webservices/synapse/trunk/java/src/site/resources/new_Synapse_Samples.html
Modified:
    webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/GenericJMSClient.java
    webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/MTOMSwAClient.java
    webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/StockQuoteClient.java
    webservices/synapse/trunk/java/modules/samples/src/main/scripts/build.xml
    webservices/synapse/trunk/java/src/site/resources/Synapse_Configuration_Language.html
    webservices/synapse/trunk/java/src/site/resources/Synapse_Samples.html

Modified: webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/GenericJMSClient.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/GenericJMSClient.java?view=diff&rev=532660&r1=532659&r2=532660
==============================================================================
--- webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/GenericJMSClient.java (original)
+++ webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/GenericJMSClient.java Thu Apr 26 01:35:26 2007
@@ -30,16 +30,20 @@
 
 public class GenericJMSClient {
 
-    public static void main(String[] args) throws Exception {
+    private static String getProperty(String name, String def) {
+        String result = System.getProperty(name);
+        if (result == null || result.length() == 0) {
+            result = def;
+        }
+        return result;
+    }
 
-        String dest = "dynamicQueues/JMSTextProxy";
-        String type = "text"; // or binary
-        String param = getRandom(100, 0.9, true) + " " +
-            (int) getRandom(10000, 1.0, true) + " IBM";
+    public static void main(String[] args) throws Exception {
 
-        if (args.length > 0) dest  = args[0];
-        if (args.length > 1) type  = args[1];
-        if (args.length > 2 && param.length() > 0) param = args[2];
+        String dest  = getProperty("jms_dest", "dynamicQueues/JMSTextProxy");
+        String type  = getProperty("jms_type", "text");
+        String param = getProperty("jms_payload",
+            getRandom(100, 0.9, true) + " " + (int) getRandom(10000, 1.0, true) + " IBM");
 
         GenericJMSClient app = new GenericJMSClient();
         if ("text".equalsIgnoreCase(type)) {

Modified: webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/MTOMSwAClient.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/MTOMSwAClient.java?view=diff&rev=532660&r1=532659&r2=532660
==============================================================================
--- webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/MTOMSwAClient.java (original)
+++ webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/MTOMSwAClient.java Thu Apr 26 01:35:26 2007
@@ -40,12 +40,20 @@
 public class MTOMSwAClient {
 
     private static final int BUFFER = 2048;
-    
+
+    private static String getProperty(String name, String def) {
+        String result = System.getProperty(name);
+        if (result == null || result.length() == 0) {
+            result = def;
+        }
+        return result;
+    }
+
     public static void main(String[] args) throws Exception {
 
-        String targetEPR = "http://localhost:8080/soap/MTOMSwASampleService";
-        String fileName = "./../../repository/conf/sample/resources/mtom/asf-logo.gif";
-        String mode = "mtom";
+        String targetEPR = getProperty("opt_url", "http://localhost:8080/soap/MTOMSwASampleService");
+        String fileName  = getProperty("opt_file", "./../../repository/conf/sample/resources/mtom/asf-logo.gif");
+        String mode      = getProperty("opt_mode", "mtom");
 
         if (args.length > 0) mode      = args[0];
         if (args.length > 1) targetEPR = args[1];

Modified: webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/StockQuoteClient.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/StockQuoteClient.java?view=diff&rev=532660&r1=532659&r2=532660
==============================================================================
--- webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/StockQuoteClient.java (original)
+++ webservices/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/StockQuoteClient.java Thu Apr 26 01:35:26 2007
@@ -42,29 +42,27 @@
  *     [-Dmode=quote | customquote | fullquote | placeorder | marketactivity]
  *     [-Daddressingurl=<url>] [-Dtransporturl=<url> | -Dproxyurl=<url>]
  * 
- * StockQuoteClient <symbol> <quote | customquote | fullquote | placeorder | marketactivity>
- *      <addurl> <trpurl> <prxurl> <repo> <policy>
  */
 public class StockQuoteClient {
 
+    private static String getProperty(String name, String def) {
+        String result = System.getProperty(name);
+        if (result == null || result.length() == 0) {
+            result = def;
+        }
+        return result;
+    }
+
     public static void main(String[] args) {
 
         // defaults
-        String symbol    = null;
-        String mode      = null;
-        String addUrl    = null;
-        String trpUrl    = null;
-        String prxUrl    = null;
-        String repo      = null;
-        String svcPolicy = null;
-
-        if (args.length > 0 && args[0].length()>0) symbol    = args[0];
-        if (args.length > 1 && args[1].length()>0) mode      = args[1];
-        if (args.length > 2 && args[2].length()>0) addUrl    = args[2];
-        if (args.length > 3 && args[3].length()>0) trpUrl    = args[3];
-        if (args.length > 4 && args[4].length()>0) prxUrl    = args[4];
-        if (args.length > 5 && args[5].length()>0) repo      = args[5];
-        if (args.length > 6 && args[6].length()>0) svcPolicy = args[6];
+        String symbol    = getProperty("symbol", "IBM");
+        String mode      = getProperty("mode", "quote");
+        String addUrl    = getProperty("addurl", null);
+        String trpUrl    = getProperty("trpurl", null);
+        String prxUrl    = getProperty("prxurl", null);
+        String repo      = getProperty("repository", "client_repo");
+        String svcPolicy = getProperty("policy", null);
 
         double price = 0; int quantity = 0;
 

Modified: webservices/synapse/trunk/java/modules/samples/src/main/scripts/build.xml
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/src/main/scripts/build.xml?view=diff&rev=532660&r1=532659&r2=532660
==============================================================================
--- webservices/synapse/trunk/java/modules/samples/src/main/scripts/build.xml (original)
+++ webservices/synapse/trunk/java/modules/samples/src/main/scripts/build.xml Thu Apr 26 01:35:26 2007
@@ -62,20 +62,19 @@
     </echo>
     </target>
 
-    <property name="symbol" value="IBM"/>
-    <property name="mode" value="quote"/>
+    <property name="symbol" value=""/>
+    <property name="mode" value=""/>
     <property name="addurl" value=""/>
     <property name="trpurl" value=""/>
     <property name="prxurl" value=""/>
-    <property name="repository" value="client_repo"/>
+    <property name="repository" value=""/>
     <property name="policy" value=""/>
     <property name="jms_dest" value=""/>
     <property name="jms_type" value=""/>
     <property name="jms_payload" value=""/>
-    <property name="opt_mode" value="mtom"/>
-    <property name="opt_url" value="http://localhost:8080/soap/MTOMSwASampleService"/>
-    <property name="opt_file" value="./../../repository/conf/sample/resources/mtom/asf-logo.gif"/>
-
+    <property name="opt_mode" value=""/>
+    <property name="opt_url" value=""/>
+    <property name="opt_file" value=""/>
     <property name="class.dir" value="target/classes"/>
 
     <path id="axis.classpath">
@@ -92,46 +91,43 @@
     <target name="stockquote" depends="compile">
         <java classname="samples.userguide.StockQuoteClient"
               classpathref="javac.classpath" fork="true">
-            <arg value="${symbol}"/>
-            <arg value="${mode}"/>
-            <arg value="${addurl}"/>
-            <arg value="${trpurl}"/>
-            <arg value="${prxurl}"/>
-            <arg value="${repository}"/>
-            <arg value="${policy}"/>
+            <sysproperty key="symbol" value="${symbol}"/>
+            <sysproperty key="mode"   value="${mode}"/>
+            <sysproperty key="addurl" value="${addurl}"/>
+            <sysproperty key="trpurl" value="${trpurl}"/>
+            <sysproperty key="prxurl" value="${prxurl}"/>
+            <sysproperty key="repository" value="${repository}"/>
+            <sysproperty key="policy" value="${policy}"/>
         </java>
     </target>
 
     <!-- a simple smoke test -->
     <target name="smoke" depends="compile">
+        <property name="addurl" value="http://localhost:9000/soap/SimpleStockQuoteService"/>
+        <property name="trpurl" value="http://localhost:8080/"/>
         <java classname="samples.userguide.StockQuoteClient"
               classpathref="javac.classpath" fork="true">
-            <arg value="IBM"/>
-            <arg value="quote"/>
-            <arg value="http://localhost:9000/soap/SimpleStockQuoteService"/>
-            <arg value="http://localhost:8080"/>
-            <arg value=""/>
-            <arg value="${repository}"/>
-            <arg value=""/>
+            <sysproperty key="addurl" value="http://localhost:9000/soap/SimpleStockQuoteService"/>
+            <sysproperty key="trpurl" value="http://localhost:8080/"/>
         </java>
     </target>
 
     <target name="jmsclient" depends="compile">
         <java classname="samples.userguide.GenericJMSClient"
               classpathref="javac.classpath" fork="true">
-            <arg value="${jms_dest}"/>
-            <arg value="${jms_type}"/>
-            <arg value="${jms_payload}"/>
+            <sysproperty key="jms_dest"    value="${jms_dest}"/>
+            <sysproperty key="jms_type"    value="${jms_type}"/>
+            <sysproperty key="jms_payload" value="${jms_payload}"/>
         </java>
     </target>
 
     <target name="optimizeclient" depends="compile">
         <java classname="samples.userguide.MTOMSwAClient"
               classpathref="javac.classpath" fork="true">
-            <arg value="${opt_mode}"/>
-            <arg value="${opt_url}"/>
-            <arg value="${opt_file}"/>
-        </java>
+            <sysproperty key="opt_mode" value="${opt_mode}"/>
+            <sysproperty key="opt_url"  value="${opt_url}"/>
+            <sysproperty key="opt_file" value="${opt_file}"/>
+        </java>            
     </target>
 
     <target name="loadbalancefailover" depends="compile">

Modified: webservices/synapse/trunk/java/src/site/resources/Synapse_Configuration_Language.html
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/src/site/resources/Synapse_Configuration_Language.html?view=diff&rev=532660&r1=532659&r2=532660
==============================================================================
--- webservices/synapse/trunk/java/src/site/resources/Synapse_Configuration_Language.html (original)
+++ webservices/synapse/trunk/java/src/site/resources/Synapse_Configuration_Language.html Thu Apr 26 01:35:26 2007
@@ -21,6 +21,75 @@
 <head>
   <meta content="text/html; charset=iso-8859-1" http-equiv="content-type">
   <title>Synapse Configuration Language</title>
+  <style type="text/css">
+p {
+font-family: Verdana, arial, sans-serif;
+font-size: 11px;
+line-height: 16px;
+color: #000000;
+font-weight: normal;
+}
+li {
+font-family: Verdana, arial, sans-serif;
+font-size: 11px;
+line-height: 16px;
+color: #000000;
+font-weight: normal;
+}  
+pre {
+    padding: 0px;
+    margin-top: 5px;
+    margin-left: 15px;
+    margin-bottom: 5px;
+    margin-right: 5px;
+    text-align: left;
+    background-color: #f0f0f0;
+    padding: 3px;
+    border: 1px dashed #3c78b5;
+    font-size: 11px;
+    font-family: Courier;
+    margin: 10px;
+    line-height: 13px;
+}  
+h1 {
+font-size: 24px;
+line-height: normal;
+font-weight: bold;
+background-color: #f0f0f0;
+color: #003366;
+ border-bottom: 1px solid #3c78b5;
+padding: 2px;
+margin: 36px 0px 4px 0px;
+}
+
+h2 {
+font-size: 18px;
+line-height: normal;
+font-weight: bold;
+background-color: #f0f0f0;
+ border-bottom: 1px solid #3c78b5;
+padding: 2px;
+margin: 27px 0px 4px 0px;
+}
+
+h3 {
+font-size: 14px;
+line-height: normal;
+font-weight: bold;
+background-color: #f0f0f0;
+padding: 2px;
+margin: 21px 0px 4px 0px;
+}
+
+h4 {
+font-size: 12px;
+line-height: normal;
+font-weight: bold;
+background-color: #f0f0f0;
+padding: 2px;
+margin: 18px 0px 4px 0px;
+}
+ </style>
 </head>
 
 <body>
@@ -32,7 +101,7 @@
 direction agnostic, but directionality can easily be added as a selection
 mechanism for mediators (see below for details).</p>
 
-<h2>Overall Structure</h2>
+<h3>Overall Structure</h3>
 
 <p>A Synapse configuration looks like the following at the top level:</p>
 <pre> &lt;definitions&gt;
@@ -44,7 +113,7 @@
    mediator*
  &lt;/definitions&gt;</pre>
 
-<h3>Registry</h3>
+<h2>Registry</h2>
 
 <p>The &lt;registry&gt; element is used to define the remote registry which
 are referenced from within the configuration. The registry provider specifies
@@ -80,7 +149,7 @@
 
 <p></p>
 
-<h3>Sequences</h3>
+<h2>Sequences</h2>
 
 <p>A &lt;sequence&gt; element is used to define a sequence of mediators that
 can be invoked later by name as a sequence of mediators.</p>
@@ -115,7 +184,7 @@
 
 <p></p>
 
-<h3>Endpoints</h3>
+<h2>Endpoints</h2>
 
 <p>An &lt;endpoint&gt; element defines a destination for an outgoing message.
 An endpoint may be specified as an address endpoint, WSDL based endpoint, a
@@ -178,7 +247,7 @@
 <p>An endpoint definition must name the endpoint, and a dynamic endpoint
 lookup must specify the key for a definition.</p>
 
-<h3>Proxy service</h3>
+<h2>Proxy service</h2>
 
 <p>A &lt;proxy&gt; element is used to define a Synapse Proxy service.</p>
 <pre> &lt;proxy name="string" [transports="(http |https |jms )+|all"]&gt;
@@ -192,12 +261,12 @@
    &lt;publishWSDL key="string" uri="string"&gt;
       &lt;endpoint&gt;...&lt;/endpoint&gt;?
    &lt;publishWSDL&gt;?
-   &lt;enableSec/&gt;?                      // These two tags will removed after the recognition of the Security and RM can be done by looking at policy
+   &lt;enableSec/&gt;?                                   // These two tags will removed after the recognition of the Security and RM can be done by looking at policy
    &lt;enableRM/&gt;?
    &lt;policy key="string"&gt;...&lt;/policy&gt;?       // optional service level policies
-                                            // (e.g. WS-Security and/or WS-RM policies)
+                                                            // (e.g. WS-Security and/or WS-RM policies)
    &lt;parameter name="string"&gt;                // optional service parameters
-      string | xml                          // (e.g. transport.jms.ConnectionFactory)
+      string | xml                                      // (e.g. transport.jms.ConnectionFactory)
    &lt;/parameter&gt;
  &lt;/proxy&gt;</pre>
 
@@ -220,18 +289,17 @@
 
 <p></p>
 
-<h3>Mediators</h3>
+<h2>Mediators</h2>
 
 <p>A mediator token refers to any of the following tokens:</p>
-<pre> send | drop | log | makefault | transform | header | filter |
- switch | class | validate | property | sequenceref | in | out </pre>
+<pre> send | drop | log | makefault | transform | header | filter | switch | class | validate | property | sequenceref | in | out </pre>
 
 <p>In addition to the above, Synapse will be able to load mediators via the
 J2SE Service Provider model. Mediator extensions must implement the
 MediatorFactory interface, similarly to the configuration extensions
 mentioned previously.</p>
 
-<p></p>
+<h3>Core Mediators</h3>
 
 <h4>Send</h4>
 
@@ -299,9 +367,54 @@
 
 <p></p>
 
-<h4>Transforms</h4>
+<h4>Property</h4>
+<pre> &lt;property name="string" [action=set|remove] (value="literal" | expression="xpath") [scope=transport|axis2]/&gt;</pre>
+
+<p>The setproperty token refers to a &lt;property&gt; element which is a
+mediator that has no direct impact on the message but rather on the message
+context flowing through Synapse. The properties which does not specify the
+action thus set on the message context applies only to the current message
+and can be later retrieved through the synapse:get-property(prop-name)
+extension function. If a scope is specified for a property, the property
+could be set as a transport header property or an (underlying) Axis2 message
+context property. Using the property element with action specified as
+"remove" you can remove the message context properties if availabel.</p>
+
+<p></p>
+
+<h4>Sequence</h4>
+<pre> &lt;sequence key="name"/&gt;</pre>
+
+<p>A sequenceref token refers to a &lt;sequence&gt; element which is used to
+invoke a named sequence of mediators.</p>
+
+<p></p>
 
-<h5>Faults</h5>
+<h4>Validate</h4>
+<pre> &lt;validate [source="xpath"]&gt;
+   &lt;parameter name="validation-feature-id" value="true|false"/&gt;*
+   &lt;schema key="string"/&gt;+
+   &lt;on-fail&gt;
+     mediator+
+   &lt;/on-fail&gt;
+ &lt;/validate&gt;</pre>
+
+<p>The &lt;validate&gt; mediator validates the result of the evaluation of
+the source xpath expression, against the schema specified. If the source
+attribute is not specified, the validation is performed against the first
+child of the SOAP body of the current message. If the validation fails, the
+on-fail sequence of mediators is executed. Parameters could be used to turn
+on/off some of the underlying features of the validator.</p>
+
+<p>Note: As the validation mediator is strongly dependent on the Xerces2-J
+2.8.0 parser, it is bundled with the Synapse extensions, so that the Synapse
+core will remain simple and lightweight.</p>
+
+<p></p>
+
+<h3>Message Transformations</h3>
+
+<h4>Fault</h4>
 <pre> &lt;makefault [version="soap11|soap12"]&gt;
    &lt;code (value="literal" | expression="xpath")/&gt;
    &lt;reason (value="literal" | expression="xpath")&gt;
@@ -318,7 +431,7 @@
 
 <p></p>
 
-<h5>XSLT</h5>
+<h4>XSLT</h4>
 <pre> &lt;xslt key="string" [source="xpath"]&gt;
    &lt;parameter name="string" (value="literal" | expression="xpath")/&gt;*
  &lt;/xslt&gt;</pre>
@@ -330,7 +443,7 @@
 
 <p></p>
 
-<h5>Headers</h5>
+<h4>Header</h4>
 <pre> &lt;header name="qname" (value="literal" | expression="xpath") [action="set"]/&gt;
  &lt;header name="qname" action="remove"/&gt;</pre>
 
@@ -343,9 +456,9 @@
 
 <p></p>
 
-<h4>Selection</h4>
+<h3>Selection</h3>
 
-<h5>Filters</h5>
+<h4>Filter</h4>
 <pre> &lt;filter (source="xpath" regex="string") | xpath="xpath"&gt;
    mediator+
  &lt;/filter&gt;</pre>
@@ -357,7 +470,7 @@
 
 <p></p>
 
-<h5>Switch</h5>
+<h4>Switch</h4>
 <pre> &lt;switch source="xpath"&gt;
    &lt;case regex="string"&gt;
      mediator+
@@ -372,46 +485,24 @@
 expressions. If the specified cases does not match and a default case exists,
 it will be executed.</p>
 
-<p></p>
+<h4>In / Out</h4>
+<pre>&lt;in&gt;<br>  mediator+
+&lt;/in&gt;<br></pre>
+<pre>&lt;out&gt;
+  mediator+
+&lt;/out&gt;</pre>
+
+<p><br>
+</p>
+
+<p>The In and Out mediators will execute the child mediators over the current
+message if the message matches the direction of the mediator. Hence all
+incoming messages would pass through the "&lt;in&gt;" mediators and vice
+versa.</p>
 
-<h4>Validation</h4>
-<pre> &lt;validate [source="xpath"]&gt;
-   &lt;parameter name="validation-feature-id" value="true|false"/&gt;*
-   &lt;schema key="string"/&gt;+
-   &lt;on-fail&gt;
-     mediator+
-   &lt;/on-fail&gt;
- &lt;/validate&gt;</pre>
-
-<p>The &lt;validate&gt; mediator validates the result of the evaluation of
-the source xpath expression, against the schema specified. If the source
-attribute is not specified, the validation is performed against the first
-child of the SOAP body of the current message. If the validation fails, the
-on-fail sequence of mediators is executed. Parameters could be used to turn
-on/off some of the underlying features of the validator.</p>
-
-<p>Note: As the validation mediator is strongly dependent on the Xerces2-J
-2.8.0 parser, it is bundled with the Synapse extensions, so that the Synapse
-core will remain simple and lightweight.</p>
-
-<p></p>
-
-<h4>Properties</h4>
-<pre> &lt;property name="string" [action=set|remove] (value="literal" | expression="xpath") [scope=transport|axis2]/&gt;</pre>
-
-<p>The setproperty token refers to a &lt;property&gt; element which is a
-mediator that has no direct impact on the message but rather on the message
-context flowing through Synapse. The properties which does not specify the
-action thus set on the message context applies only to the current message
-and can be later retrieved through the synapse:get-property(prop-name)
-extension function. If a scope is specified for a property, the property
-could be set as a transport header property or an (underlying) Axis2 message
-context property. Using the property element with action specified as
-"remove" you can remove the message context properties if availabel.</p>
+<h3>Extension mediator</h3>
 
-<p></p>
-
-<h4>Class Mediators</h4>
+<h4>Class Mediator</h4>
 <pre> &lt;class name="class-name"&gt;
    &lt;property name="string" (value="literal" | expression="xpath")/&gt;*
  &lt;/class&gt; </pre>
@@ -419,19 +510,11 @@
 <p>The class mediator creates an instance of the specified class and sets it
 as a mediator. The class must implement the org.apache.synapse.api.Mediator
 interface. If any properties are specified, the corresponding setter methods
-are invoked on the class. However, Synapse will only support String
+are invoked on the class. However, Synapse currently supports only String
 properties.</p>
 
 <p></p>
 
-<h4>Reusing Sequences</h4>
-<pre> &lt;sequence key="name"/&gt;</pre>
-
-<p>A sequenceref token refers to a &lt;sequence&gt; element which is used to
-invoke a named sequence of mediators.</p>
-
-<p></p>
-
 <h3>Extensibility of Synapse</h3>
 
 <p>The Synapse configuration language could be easily extended, with
@@ -462,53 +545,40 @@
 
 <p></p>
 
-<h4>Script Language Mediators</h4>
+<h3>Scripting language mediators</h3>
 
-<p>Synapse supports Mediators implemented in a variety of scripting languages
-such as JavaScript, Python or Ruby.</p>
-
-<p>There are two ways of defining script mediators, either with the script
-program statements stored in a separate file which is referenced via a
-localEntry or registry entry, or with the script program statements embedded
-in-line within the Synapse configuration.</p>
+<p></p>
 
-<p>A script mediator using a entry (registry or local) is defined as
-follows:</p>
+<p>Synapse supports Mediators implemented in a variety of scripting languages
+such as JavaScript, Python or Ruby. There are two ways of defining script
+mediators, either with the script program statements stored in a separate
+file which is referenced via the local or remote registry entry, or with the
+script program statements embedded in-line within the Synapse configuration.
+A script mediator using a script off the registry (local or remote) is
+defined as follows:</p>
 <pre> &lt;script key="string" language="string" [function="script-function-name"]/&gt;</pre>
 
-<p>The property-key is a Synapse registry property containing a URL to the
-script source. Optional language attribute specifies the scripting language
-on which this script runs and if not specified the language will be
-determined by the file extension. The function is an optional attribute
-defining the name of the script function to call, if not specified it
-defaults to a function named 'mediate'. The function is passed a single
-parameter which is the Synapse MessageContext. The function may return a
-boolean, if it does not then true is assumed. The language the script is
-written in is determined from the file name suffix of the property key
-value.</p>
-
-<p>An inline script mediator has the script source embedded in the config
-XML:</p>
+<p>The property key is the registry key to load the script. The language
+attribute specifies the scripting language of the script code (e.g. "js" for
+Javascript, "rb" for ruby, "groovy" for Groovy, "py" for Python..). The
+function is an optional attribute defining the name of the script function to
+invoke, if not specified it defaults to a function named 'mediate'. The
+function is passed a single parameter - which is the Synapse MessageContext.
+The function may return a boolean, if it does not, then true is assumed, and
+the script mediator returns this value. An inline script mediator has the
+script source embedded in the configuration as follows:</p>
 <pre> &lt;script language="string"&gt;...script source code...&lt;script/&gt;</pre>
 
-<p>where language is the script language name extension. For example,
-&lt;script language="js"&gt; indicates a JavaScript program, &lt;script
-language="rb"&gt; a Ruby program, or &lt;script language="py"&gt; a Python
-program. The environment of the script has the Synapse MessageContext
-predefined in a script variable named 'mc'.</p>
-
-<p>An example of an inline mediator using JavaScript/E4X which returns false
-if the SOAP message body contains an element named 'symbol' which has a value
-of 'IBM' would be:</p>
+<p>The execution context environment of the script has access to the Synapse
+MessageContext predefined in a script variable named 'mc' . An example of an
+inline mediator using JavaScript/E4X which returns false if the SOAP message
+body contains an element named 'symbol' which has a value of 'IBM' would
+be:</p>
 <pre> &lt;script language="js"&gt;mc.getPayloadXML()..symbol != "IBM";&lt;script/&gt;</pre>
 
-<p>The boolean response from the inlined mediator is either the response from
-the evaluation of the script statements or if that result is not a boolean
-then a response of true is assumed.</p>
-
 <p>Synapse uses the Apache <a href="http://jakarta.apache.org/bsf/">Bean
-Scripting Framework</a> for the script language support, any script language
-supported by BSF may be used to implement a Synapse Mediator.</p>
+Scripting Framework</a> for the scripting language support, any script
+language supported by BSF may be used to implement a Synapse Mediator.</p>
 
 <p>Implementing a Mediator with a script language can have advantages over
 using the built in Synapse Mediator types or implementing a custom Java class
@@ -518,13 +588,12 @@
 development and prototyping of custom mediators. An additional benefit of
 some scripting languages is that they have very simple and elegant XML
 manipulation capabilities, for example JavaScript E4X or Ruby REXML, so this
-makes them well suited for use in the Synapse mediation environment.</p>
-
-<p>For both types of script mediator definition the MessageContext passed in
-to the script has additional methods over the standard Synapse MessageContext
-to enable working with the XML in a way natural to the scripting language.
-For example when using JavaScript get/setPayloadXML use E4X XML objects, when
-using Ruby they use REXML documents.</p>
+makes them well suited for use in the Synapse mediation environment. For both
+types of script mediator definition the MessageContext passed into the script
+has additional methods over the standard Synapse MessageContext to enable
+working with the XML in a way natural to the scripting language. For example
+when using JavaScript getPayloadXML and setPayloadXML, E4X XML objects, and
+when using Ruby, REXML documents.</p>
 
 <p></p>
 </body>

Modified: webservices/synapse/trunk/java/src/site/resources/Synapse_Samples.html
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/src/site/resources/Synapse_Samples.html?view=diff&rev=532660&r1=532659&r2=532660
==============================================================================
--- webservices/synapse/trunk/java/src/site/resources/Synapse_Samples.html (original)
+++ webservices/synapse/trunk/java/src/site/resources/Synapse_Samples.html Thu Apr 26 01:35:26 2007
@@ -21,7 +21,13 @@
   <meta http-equiv="content-type" content="">
   <title></title>
   <style type="text/css">
-p {
+li {
+font-family: Verdana, arial, sans-serif;
+font-size: 11px;
+line-height: 16px;
+color: #000000;
+font-weight: normal;
+}p {
 font-family: Verdana, arial, sans-serif;
 font-size: 11px;
 line-height: 16px;
@@ -91,81 +97,75 @@
 
 <div class="section-content">
 <ul>
-  <li><a href="#Overview">Overview</a></li>
-  <li><a href="#Axis2Server">Starting the Axis2 Server</a></li>
+  <li><a href="Synapse_Samples_Setup.html#Overview">Overview</a></li>
   <li><a href="#MediationSamples">Message mediation samples</a> 
     <ul>
-      <li><a href="#Sample0">Sample 0: Introduction to Synapse - log a
-        message</a></li>
-      <li><a href="#Sample1">Sample 1: Content based routing</a></li>
-      <li><a href="#Sample2">Sample 2: Switch-case mediator and writing and
-        reading of message properties</a></li>
-      <li><a href="#Sample3">Sample 3: Simple properties, and reusable
-        endpoints and sequences</a></li>
-      <li><a href="#Sample4">Sample 4: Error handling with the try and
-        makefault mediators</a></li>
-      <li><a href="#Sample5">Sample 5: Error handling within a sequence using
-        the 'onError' sequence</a></li>
-      <li><a href="#Sample6">Sample 6: Header, in and out mediators</a></li>
-      <li><a href="#Sample7">Sample 7: Extension mediators, static XML
-        properties and the validate mediator</a></li>
-      <li><a href="#Sample8">Sample 8: URL source properties, registry based
-        properties and the XSLT mediator</a></li>
-      <li><a href="#Sample9">Sample 9: Dynamic sequences with a
-      Registry</a></li>
-      <li><a href="#Sample10">Sample 10: Dynamic endpoints with a
-      Registry</a></li>
-      <li><a href="#Sample11">Sample 11: A full registry based
-        configuration</a></li>
+      <li><a href="#Sample0">Sample 0: Introduction to Synapse</a></li>
+      <li><a href="#Sample1">Sample 1: Content based routing (CBR)</a></li>
+      <li><a href="#Sample2">Sample 2: CBR with the Switch-case mediator,
+        using message properties</a></li>
+      <li><a href="#Sample3">Sample 3: Local Registry entry definitions,
+        reusable endpoints and sequences</a></li>
+      <li><a href="#Sample4">Sample 4: Introduction to error handling</a></li>
+      <li><a href="#Sample5">Sample 5: Creating SOAP fault messages and
+        changing the direction of a message</a></li>
+      <li><a href="#Sample6">Sample 6: Manipulating SOAP headers, and
+        filtering incoming and outgoing messages</a></li>
+      <li><a href="#Sample7">Sample 7: Introduction to local Registry entries
+        and using Schema validation</a></li>
+      <li><a href="#Sample8">Sample 8: Introduction to static and dynamic
+        registry resources, and using XSLT transformations</a></li>
+      <li><a href="#Sample9">Sample 9: Introduction to dynamic sequences with
+        the Registry</a></li>
+      <li><a href="#Sample10">Sample 10: Introduction to dynamic endpoints
+        with the Registry</a></li>
+      <li><a href="#Sample11">Sample 11: A full registry based configuration,
+        and sharing a configuration between multiple instances</a></li>
     </ul>
   </li>
-  <li><a href="#WSSecurity">WS-Security</a> 
+  <li><a href="#Endpoints">Endpoints</a> 
     <ul>
-      <li><a href="#Sample50">Sample 50: Connecting to endpoints with
-        WS-Security</a></li>
+      <li><a href="#Sample50">Sample 50: Using WS-Security for outgoing
+        messages</a></li>
+      <li><a href="#Sample51">Sample 51: MTOM and SwA optimizations and
+        request/response correlation</a></li>
     </ul>
   </li>
   <li><a href="#ProxyServices">Synapse Proxy service samples</a> 
     <ul>
-      <li><a href="#Sample100">Sample 100: Introduction to Synapse proxy
-        services</a></li>
-      <li><a href="#Sample101">Sample 101: Custom sequences and endpoints for
-        message mediation with proxy services</a></li>
-      <li><a href="#Sample102">Sample 102: Attaching service level
-        WS-Security policies to proxy services</a></li>
-      <li><a href="#Sample103">Sample 103: Using WS-Security signing and
-        encryption with proxy services through WS-Policy</a></li>
-      <li><a href="#Sample104">Sample 104: Explicit out sequence in proxy
-        service level to mediate proxy response</a></li>
-      <li><a href="#Sample105">Sample 105: Pure POX/Text and Binary JMS Proxy
-        services - including MTOM</a></li>
+      <li><a href="#Sample100">Sample 100: Introduction to proxy
+      services</a></li>
+      <li><a href="#Sample101">Sample 101: Custom sequences and endpoints
+        with proxy services</a></li>
+      <li><a href="#Sample102">Sample 102: Switching transports and message
+        format from SOAP to REST/POX</a></li>
+      <li><a href="#Sample103">Sample 103: Using WS-Security with policy
+        attachments for proxy services</a></li>
     </ul>
   </li>
-  <li><a href="#ProxyServices">Transport samples</a> 
+  <li><a href="#Transport">Transport samples</a> 
     <ul>
       <li><a href="#Sample110">Sample 110: Introduction to switching
-        transports with proxy services</a></li>
-      <li><a href="#Sample111">Sample 111: Demonstrate switching from HTTP to
-        JMS</a></li>
+        transports - JMS to http/s</a></li>
+      <li><a href="#Sample111">Sample 111: Demonstrate switching from http/s
+        to JMS</a></li>
       <li><a href="#Sample112">Sample 112: Demonstrate one way messaging /
-        fireAndForget</a></li>
+        fireAndForget()</a></li>
+      <li><a href="#Sample113">Sample 113: Pure text/binary and POX message
+        support with JMS</a></li>
     </ul>
   </li>
   <li><a href="#ScriptMediators">Script Mediators</a> 
     <ul>
-      <li><a href="#ScriptSetup">Setting up Script Mediator support in
-        Synapse</a> 
-        <ul>
-          <li><a href="#ScriptSetupJavaScript">JavaScript</a></li>
-          <li><a href="#ScriptSetupRuby">Ruby</a></li>
-        </ul>
-      </li>
-    </ul>
-    <ul>
+      <li><a href="Synapse_Samples_Setup.html#ScriptSetup">Setting up Script
+        Mediators</a> </li>
       <li><a href="#Sample500">Sample 500: Introduction to script
         mediators</a></li>
-      <li><a href="#Sample501">Sample 501: In-line script mediators</a></li>
-      <li><a href="#Sample503">Sample 503: Ruby script mediators</a></li>
+      <li><a href="#Sample501">Sample 501: In-line script mediation</a></li>
+      <li><a href="#Sample502">Sample 502: Accessing Synapse message context
+        API methods</a></li>
+      <li><a href="#Sample503">Sample 503: Using Ruby scripts for
+        mediation</a></li>
     </ul>
   </li>
 </ul>
@@ -280,8 +280,6 @@
 <h2><a name="Sample2">Sample 2:</a></h2>
 <pre>&lt;!-- switch-case mediator and setting and reading of local properties on a message --&gt;
 &lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
-
-    &lt;!-- introduction to switch-case-default mediator --&gt;
     &lt;switch source="//m0:getQuote/m0:request/m0:symbol" xmlns:m0="http://services.samples/xsd"&gt;
         &lt;case regex="IBM"&gt;
             &lt;!-- the property mediator sets a local property on the *current* message --&gt;
@@ -292,7 +290,7 @@
         &lt;/case&gt;
         &lt;default&gt;
             &lt;!-- it is possible to assign the result of an XPath expression as well --&gt;
-            &lt;set-property name="symbol"
+            &lt;property name="symbol"
                   expression="fn:concat('Normal Stock - ', //m0:getQuote/m0:request/m0:symbol)"
                   xmlns:m0="http://services.samples/xsd"/&gt;
         &lt;/default&gt;
@@ -308,7 +306,6 @@
 
     &lt;!-- Send the messages where they are destined to (i.e. the 'To' EPR of the message) --&gt;
     &lt;send/&gt;
-
 &lt;/definitions&gt;</pre>
 
 <p><strong>Objective: Introduce switch-case mediator and writing and reading
@@ -402,7 +399,7 @@
 [HttpServerWorker-1] DEBUG SendMediator - Send mediator :: mediate() 
 [HttpServerWorker-1] DEBUG AddressEndpoint - Sending To: http://localhost:9000/soap/SimpleStockQuoteService </pre>
 
-<h2><a name="Sample41" id="Sample41">Sample 4:</a></h2>
+<h2><a name="Sample4">Sample 4:</a></h2>
 <pre>&lt;!-- introduction to error handling --&gt;
 &lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
 
@@ -502,7 +499,7 @@
 [HttpServerWorker-1] DEBUG LogMediator - Log mediator :: mediate() 
 [HttpServerWorker-1] INFO  LogMediator - text = An unexpected error occured for stock SUN, message = Reference to non-existent endpoint for key : sunPort</pre>
 
-<h2>Sample 5:</h2>
+<h2><a name="Sample5">Sample 5:</a></h2>
 <pre>&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
 
     &lt;sequence name="myFaultHandler"&gt;
@@ -545,12 +542,12 @@
 </strong></p>
 
 <p><strong>Pre-Requisites:</strong><br>
-Start the Synapse configuration numbered 4: i.e. synapse -sample 5<br>
+Start the Synapse configuration numbered 5: i.e. synapse -sample 5<br>
 Start the Axis2 server and deploy the SimpleStockQuoteService if not already
 done</p>
 
 <p>When the MSFT stock quote is requested, an unknown host exception would be
-caused, and a connection refuxed exception would be caused for the SUN stock.
+caused, and a connection refused exception would be caused for the SUN stock.
 This information is captured and returned back to the original client as a
 SOAP fault in this example.</p>
 <pre>ant stockquote -Daddurl=http://localhost:9000/soap/SimpleStockQuoteService -Dtrpurl=http://localhost:8080/ -Dsymbol=MSFT</pre>
@@ -907,7 +904,7 @@
 
 <p></p>
 
-<h1>Endpoints</h1>
+<h1><a name="Endpoints">Endpoints</a></h1>
 
 <h2><a name="Sample50">Sample 50:</a></h2>
 <pre>&lt;!-- Connecting to endpoints with WS-Security for outgoing messages --&gt;
@@ -1004,7 +1001,7 @@
       &lt;/soapenv:Body&gt;
    &lt;/soapenv:Envelope&gt;0</pre>
 
-<h2>Sample 51:</h2>
+<h2><a name="Sample51">Sample 51:</a></h2>
 <pre>&lt;!-- MTOM and SwA and message properties to correlate requests and responses --&gt;
 &lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
     &lt;in&gt;
@@ -1012,7 +1009,7 @@
             &lt;property name="example" value="mtom"/&gt;
             &lt;send&gt;
                 &lt;endpoint&gt;
-                    &lt;address uri="http://localhost:9001/soap/MTOMSwASampleService" optimize="mtom"/&gt;
+                    &lt;address uri="http://localhost:9000/soap/MTOMSwASampleService" optimize="mtom"/&gt;
                 &lt;/endpoint&gt;
             &lt;/send&gt;
         &lt;/filter&gt;
@@ -1132,7 +1129,7 @@
 Content-ID: 
          &lt;urn:uuid:15FD2DA2584A32BF7C1177414169826&gt;22800GIF89a... &lt;&lt; binary content &gt;&gt;</pre>
 
-<h1><a name="ProxyServices1" id="ProxyServices1">Proxy services</a></h1>
+<h1><a name="ProxyServices" id="ProxyServices">Proxy services</a></h1>
 
 <h2><a name="Sample100">Sample 100:</a></h2>
 <pre>&lt;!-- introduction to Synapse proxy services --&gt;
@@ -1375,7 +1372,7 @@
 being forwarded back to the client is signed and encrypted as expected by the
 client.</p>
 
-<h1><a name="Transports1" id="Transports1">Transports</a></h1>
+<h1><a name="Transport">Transports</a></h1>
 
 <h2><a name="Sample110">Sample 110:</a></h2>
 <pre>&lt;synapse xmlns="http://ws.apache.org/ns/synapse"&gt;
@@ -1536,7 +1533,7 @@
 SimpleStockQuoteService replies to Synapse with a HTTP 202 reply, and that
 Synapse in-turn replies to the client with a HTTP 202 acknowledgement</p>
 
-<h2>Sample 113:</h2>
+<h2><a name="Sample113">Sample 113:</a></h2>
 <pre>&lt;!-- demonstrate JMS pure text, binary and POX message support --&gt;
 &lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
 
@@ -1726,7 +1723,7 @@
 the message as:</p>
 <pre>Wed Apr 25 20:24:50 LKT 2007 samples.services.SimpleStockQuoteService :: Accepted order for : 19211 stocks of MSFT at $ 172.39703010684752</pre>
 
-<h1><a name="ScriptMediators1" id="ScriptMediators1">Script mediators</a></h1>
+<h1><a name="ScriptMediators">Script mediators</a></h1>
 
 <p>Synapse supports Mediators implemented in a variety of scripting languages
 such as JavaScript, Python or Ruby. Implementing a Mediator with a script
@@ -1895,7 +1892,7 @@
 
 <p></p>
 
-<h2>Sample 502</h2>
+<h2><a name="Sample502">Sample 502</a></h2>
 <pre>&lt;!-- accessing the Synapse APIs from scripting languages --&gt;
 &lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
     &lt;in&gt;

Copied: webservices/synapse/trunk/java/src/site/resources/Synapse_Samples_Setup.html (from r532369, webservices/synapse/trunk/java/src/site/resources/new_Synapse_Samples.html)
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/src/site/resources/Synapse_Samples_Setup.html?view=diff&rev=532660&p1=webservices/synapse/trunk/java/src/site/resources/new_Synapse_Samples.html&r1=532369&p2=webservices/synapse/trunk/java/src/site/resources/Synapse_Samples_Setup.html&r2=532660
==============================================================================
--- webservices/synapse/trunk/java/src/site/resources/new_Synapse_Samples.html (original)
+++ webservices/synapse/trunk/java/src/site/resources/Synapse_Samples_Setup.html Thu Apr 26 01:35:26 2007
@@ -5,19 +5,80 @@
 <head>
   <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
   <title>Apache Synapse Samples</title>
+  <meta name="generator" content="Amaya 9.54, see http://www.w3.org/Amaya/" />
   <style type="text/css">
-  pre {
-    font-family: Georgia, "Times New Roman",Times, serif;
-    font-size:10;
-    border-style:double;
-    color: darkblue;
-  }
+p {
+font-family: Verdana, arial, sans-serif;
+font-size: 11px;
+line-height: 16px;
+color: #000000;
+font-weight: normal;
+}
+li {
+font-family: Verdana, arial, sans-serif;
+font-size: 11px;
+line-height: 16px;
+color: #000000;
+font-weight: normal;
+}  
+pre {
+    padding: 0px;
+    margin-top: 5px;
+    margin-left: 15px;
+    margin-bottom: 5px;
+    margin-right: 5px;
+    text-align: left;
+    background-color: #f0f0f0;
+    padding: 3px;
+    border: 1px dashed #3c78b5;
+    font-size: 11px;
+    font-family: Courier;
+    margin: 10px;
+    line-height: 13px;
+}  
+h1 {
+font-size: 24px;
+line-height: normal;
+font-weight: bold;
+background-color: #f0f0f0;
+color: #003366;
+ border-bottom: 1px solid #3c78b5;
+padding: 2px;
+margin: 36px 0px 4px 0px;
+}
+
+h2 {
+font-size: 18px;
+line-height: normal;
+font-weight: bold;
+background-color: #f0f0f0;
+ border-bottom: 1px solid #3c78b5;
+padding: 2px;
+margin: 27px 0px 4px 0px;
+}
+
+h3 {
+font-size: 14px;
+line-height: normal;
+font-weight: bold;
+background-color: #f0f0f0;
+padding: 2px;
+margin: 21px 0px 4px 0px;
+}
+
+h4 {
+font-size: 12px;
+line-height: normal;
+font-weight: bold;
+background-color: #f0f0f0;
+padding: 2px;
+margin: 18px 0px 4px 0px;
+}
  </style>
-  <meta name="generator" content="Amaya 9.54, see http://www.w3.org/Amaya/" />
 </head>
 
 <body>
-<p>Overview</p>
+<h1>Overview</h1>
 
 <p></p>
 
@@ -26,7 +87,7 @@
 services are provided in addition to the sample configurations, and scripts
 are provided to execute the sample scenarions as explained below. </p>
 
-<p>Pre-requisites</p>
+<h4>Pre-requisites</h4>
 
 <p>You will need a Java development kit / JRE version 1.4 or later and Apache
 Ant 1.5 or later at a minimum to try out the samples. Ant can be downloaded
@@ -34,11 +95,9 @@
 ActiveMQ installation by default (or another JMS provider with configuration)
 and any https examples would require a JDK version 1.5 or later.</p>
 
-<p></p>
+<h2>Understanding the samples</h2>
 
-<p>Understanding the samples</p>
-
-<p>&lt;TODO image&gt;</p>
+<p></p>
 
 <p>The above diagram depicts the interactions between the clients, Synapse
 and services at a high level. The Clients are able to send SOAP/REST or POX
@@ -48,14 +107,20 @@
 mediation through Synapse, the requests are passed over to the sample
 services. The sample clients and services are explained below.</p>
 
-<p>Using the sample clients</p>
+<p></p>
+
+<h2>Using the sample clients</h2>
+
+<p></p>
 
 <p>The sample clients could be executed from the samples/axis2Client
 directory through the provided ant script. Simply executing 'ant' displays
 the available clients and some of the sample options used to configure them.
 The sample clients available are listed below:</p>
 
-<p>1. Stock quote client</p>
+<h3>1. Stock quote client</h3>
+
+<p></p>
 
 <p>This is a simple SOAP client that could send stock quote requests, and
 receive and display the last sale price for a stock symbol. </p>
@@ -118,7 +183,7 @@
 <p>Note : See samples/axis2Client/src/samples/common/StockQuoteHandler.java
 for sample responses expected by the clients.</p>
 
-<p>Smart client mode:</p>
+<h4>Smart client mode:</h4>
 
 <p>The 'addurl' property sets the WS-Addressing EPR, and the 'trpurl' sets a
 transport URL for a message. Thus by specifying both of these properties, the
@@ -128,9 +193,7 @@
 delivered to the ultimate reciver. </p>
 <pre>e.g: ant stockquote -Daddurl=&lt;addressingEPR&gt; -Dtrpurl=&lt;synapse&gt;</pre>
 
-<p></p>
-
-<p>Dumb client mode:</p>
+<h4>Gateway / Dumb client mode:</h4>
 
 <p>By specifying only a transport URL, the client operates in the 'dumb
 client' mode, where it sends the message to Synapse and depends on the
@@ -138,9 +201,7 @@
 destination.</p>
 <pre>e.g: ant stockquote -Dtrpurl=&lt;synapse&gt;</pre>
 
-<p></p>
-
-<p>Proxy client mode:</p>
+<h4>Proxy client mode:</h4>
 
 <p>In this mode, the client uses the 'prxurl' as a http proxy to send the
 request. Thus by setting the 'prxurl' to Synapse, the client could ensure
@@ -148,6 +209,8 @@
 optionally set a WS-Addressing EPR if required.</p>
 <pre>e.g: ant stockquote -Dprxurl=&lt;synapse&gt; [-Daddurl=&lt;addressingEPR&gt;]</pre>
 
+<p></p>
+
 <p>Specifying a policy</p>
 
 <p>By specifying a WS-Policy using the 'policy' property, QoS aspects such as
@@ -157,7 +220,9 @@
 
 <p></p>
 
-<p>2. Generic JMS client</p>
+<h3>2. Generic JMS client</h3>
+
+<p></p>
 
 <p>The JMS client is able to send plain text, plain binary content or POX
 content by directly publishing a JMS message to the specified destination.
@@ -165,6 +230,8 @@
 The 'jms_type' property could specify 'text', 'binary' or 'pox' to specify
 the type of message payload. </p>
 
+<p></p>
+
 <p>The plain text payload for a 'text' message could be specified through the
 'payload' property. For binary messages, the 'payload' property would contain
 the path to the binary file. For POX messages, the 'payload' property would
@@ -182,7 +249,9 @@
 
 <p></p>
 
-<p>3. MTOM / SwA client</p>
+<h3>3. MTOM / SwA client</h3>
+
+<p></p>
 
 <p>The MTOM / SwA client is able to send a binary image file as a MTOM or SwA
 optimized message, and receive the same file again through the response and
@@ -195,7 +264,9 @@
 
 <p></p>
 
-<p>Starting the sample services</p>
+<h2>Starting the sample services</h2>
+
+<p></p>
 
 <p>The sample services ship with a pre-configured Axis2 server and
 demonstrates in-only and in-out SOAP/REST or POX messaging over http/s and
@@ -215,6 +286,8 @@
 BUILD SUCCESSFUL
 Total time: 3 seconds</pre>
 
+<p></p>
+
 <p>To start the Axis2 server, go to the samples/axis2Server directory and
 execute the axis2server.sh or axis2server.bat script. This starts the Axis2
 server with the http transport listener on port 9000 and https on 9002
@@ -223,9 +296,11 @@
 supported by default, and could be easily enabled by uncommenting the JMS
 transport from the repository/conf/axis2.xml</p>
 
+<p></p>
+
 <p>Sample services</p>
 
-<p>1. SimpleStockQuoteService</p>
+<h3>1. SimpleStockQuoteService</h3>
 
 <p>This service has four operations, getQuote (in-out), getFullQuote(in-out),
 getMarketActivity(in-out) and placeOrder (in-only). The getQuote operation
@@ -235,13 +310,13 @@
 of given symbols. The placeOrder operation will accept a one way message for
 an order.</p>
 
-<p>2. SecureStockQuoteService </p>
+<h3>2. SecureStockQuoteService </h3>
 
 <p>This service is a clone of the SimpleStockQuoteService, but has
 WS-Security enabled and an attached security policy for signing and
 encryption of messages.</p>
 
-<p>3. MTOMSwASampleService</p>
+<h3>3. MTOMSwASampleService</h3>
 
 <p>This service has three operations uploadFileUsingMTOM(in-out),
 uploadFileUsingSwA(in-out) and oneWayUploadUsingMTOM(in-only) and
@@ -250,6 +325,8 @@
 MTOM and SwA, and returns this image back again as the response; while the
 oneWayUploadUsingMTOM saves the request message to disk.</p>
 
+<p></p>
+
 <p>Starting sample Synapse configurations</p>
 
 <p>To start Synapse with the sample default configuration, execute the
@@ -264,7 +341,9 @@
 
 <p></p>
 
-<p>Setting up JMS</p>
+<h2>Setting up JMS</h2>
+
+<p></p>
 
 <p>The samples used in this guide assumes the existence of a local ActiveMQ
 (4.1.0 or higher) installation properly installed and started up. You also
@@ -272,9 +351,14 @@
 support ActiveMQ. These files are found in the 'lib' directory of the
 ActiveMQ installation.</p>
 
-<p>activeio-core-3.0.0-incubator.jar<br />
-activemq-core-4.1.0-incubator.jar<br />
-geronimo-j2ee-management_1.0_spec-1.0.jar</p>
+<p></p>
+<ul>
+  <li>activeio-core-3.0.0-incubator.jar</li>
+  <li>activemq-core-4.1.0-incubator.jar</li>
+  <li>geronimo-j2ee-management_1.0_spec-1.0.jar</li>
+</ul>
+
+<p></p>
 
 <p>To enable the JMS transport, you need to uncomment the JMS transport
 listener configuration. If you are using a JMS provider other than ActiveMQ
@@ -306,8 +390,29 @@
 
 <p></p>
 
+<h2>Configuring Synapse for Script Mediator support</h2>
+
 <p></p>
 
-<p>Table of contents</p>
+<p>The Synapse Script Mediator is a Synapse extension, and thus all
+pre-requisites are not bundled by default with the Synapse distribution.
+Before you use some script mediators you may need to manually add the
+required jar files to the Synapse lib directory, and optionally perform other
+installation tasks as may be required by the individual scripting language.
+This is detailed in the following sections.</p>
+
+<h4>JavaScript support</h4>
+
+<p>The JavaScript/E4X support is enabled by default and comes ready-to-use
+with the Synapse distribution.</p>
+
+<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/jruby-bin-0.9.9.tar.gz">here</a>.</p>
+
+<p> </p>
 </body>
 </html>



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