You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@synapse.apache.org by ru...@apache.org on 2008/04/16 11:01:49 UTC

svn commit: r648629 - in /synapse/trunk/java: modules/samples/src/main/java/samples/userguide/ modules/samples/src/main/scripts/ repository/conf/sample/ src/site/xdoc/

Author: ruwan
Date: Wed Apr 16 02:01:38 2008
New Revision: 648629

URL: http://svn.apache.org/viewvc?rev=648629&view=rev
Log:
Fixing the issue SYNAPSE-265, samples for the FIX transport

Added:
    synapse/trunk/java/modules/samples/src/main/java/samples/userguide/FIXClient.java   (with props)
    synapse/trunk/java/repository/conf/sample/synapse_sample_257.xml   (with props)
    synapse/trunk/java/repository/conf/sample/synapse_sample_258.xml   (with props)
Modified:
    synapse/trunk/java/modules/samples/src/main/scripts/build.xml
    synapse/trunk/java/src/site/xdoc/Synapse_Samples.xml
    synapse/trunk/java/src/site/xdoc/Synapse_Samples_Setup.xml

Added: synapse/trunk/java/modules/samples/src/main/java/samples/userguide/FIXClient.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/samples/src/main/java/samples/userguide/FIXClient.java?rev=648629&view=auto
==============================================================================
--- synapse/trunk/java/modules/samples/src/main/java/samples/userguide/FIXClient.java (added)
+++ synapse/trunk/java/modules/samples/src/main/java/samples/userguide/FIXClient.java Wed Apr 16 02:01:38 2008
@@ -0,0 +1,183 @@
+/*
+*  Licensed to the Apache Software Foundation (ASF) under one
+*  or more contributor license agreements.  See the NOTICE file
+*  distributed with this work for additional information
+*  regarding copyright ownership.  The ASF licenses this file
+*  to you under the Apache License, Version 2.0 (the
+*  "License"); you may not use this file except in compliance
+*  with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+*  Unless required by applicable law or agreed to in writing,
+*  software distributed under the License is distributed on an
+*   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+*  KIND, either express or implied.  See the License for the
+*  specific language governing permissions and limitations
+*  under the License.
+*/
+
+package samples.userguide;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.Constants;
+import org.apache.axis2.transport.http.HttpTransportProperties;
+import org.apache.axis2.transport.http.HTTPConstants;
+
+import java.util.Date;
+import java.io.File;
+import java.net.URL;
+
+
+public class FIXClient {
+
+    public static void main(String[] args) {
+        try {
+            executeClient();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    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 executeClient() throws Exception {
+        Options options = new Options();
+        ServiceClient serviceClient;
+        ConfigurationContext configContext = null;
+
+        String symbol = getProperty("symbol", "IBM");
+        String mode = getProperty("mode", "buy");
+
+        String addUrl = getProperty("addurl", null);
+        String trpUrl = getProperty("trpurl", null);
+        String prxUrl = getProperty("prxurl", null);
+        String repo = getProperty("repository", "client_repo");
+        String qty = getProperty("qty", "1");
+
+
+        String side = "1";
+        if (mode.equals("sell")) {
+            side = "2";
+        }
+
+        if (repo != null && !"null".equals(repo)) {
+            configContext =
+                    ConfigurationContextFactory.
+                            createConfigurationContextFromFileSystem(repo,
+                                    repo + File.separator + "conf" + File.separator + "axis2.xml");
+            serviceClient = new ServiceClient(configContext, null);
+        } else {
+            serviceClient = new ServiceClient();
+        }
+
+        OMFactory factory = OMAbstractFactory.getOMFactory();
+        OMElement message = factory.createOMElement("message", null);
+        message.addChild(getHeader(factory));
+        message.addChild(getBody(factory, symbol, side, qty));
+        message.addChild(factory.createOMElement("trailer", null));
+
+        // set addressing, transport and proxy url
+        if (addUrl != null && !"null".equals(addUrl)) {
+            serviceClient.engageModule("addressing");
+            options.setTo(new EndpointReference(addUrl));
+        }
+        if (trpUrl != null && !"null".equals(trpUrl)) {
+            options.setProperty(Constants.Configuration.TRANSPORT_URL, trpUrl);
+        }
+        if (prxUrl != null && !"null".equals(prxUrl)) {
+            HttpTransportProperties.ProxyProperties proxyProperties =
+                    new HttpTransportProperties.ProxyProperties();
+            URL url = new URL(prxUrl);
+            proxyProperties.setProxyName(url.getHost());
+            proxyProperties.setProxyPort(url.getPort());
+            proxyProperties.setUserName("");
+            proxyProperties.setPassWord("");
+            proxyProperties.setDomain("");
+            options.setProperty(HTTPConstants.PROXY, proxyProperties);
+        }
+
+        options.setAction("urn:mediate");
+        serviceClient.setOptions(options);
+        serviceClient.sendReceive(message);
+        Thread.sleep(5000);
+
+        try {
+            if (configContext != null) {
+                configContext.terminate();
+            }
+        } catch (Exception ignore) { }
+
+    }
+
+    private static OMElement getHeader(OMFactory factory) {
+        OMElement header = factory.createOMElement("header", null);
+
+        OMElement msgType = factory.createOMElement("field", null);
+        msgType.addAttribute(factory.createOMAttribute("id", null, "35"));
+        factory.createOMText(msgType, "D");
+        header.addChild(msgType);
+
+        OMElement sendingTime  = factory.createOMElement("field", null);
+        sendingTime.addAttribute(factory.createOMAttribute("id", null, "52"));
+        factory.createOMText(sendingTime, new Date().toString());
+        header.addChild(sendingTime);
+
+        return header;
+    }
+
+    private static OMElement getBody(OMFactory factory, String text, String mode, String qtyValue) {
+        OMElement body = factory.createOMElement("body", null);
+
+        OMElement clordID = factory.createOMElement("field", null);
+        clordID.addAttribute(factory.createOMAttribute("id", null, "11"));
+        factory.createOMText(clordID, "122333");
+        body.addChild(clordID);
+
+        OMElement handleIns = factory.createOMElement("field", null);
+        handleIns.addAttribute(factory.createOMAttribute("id", null, "21"));
+        factory.createOMText(handleIns, "1");
+        body.addChild(handleIns);
+
+        OMElement qty = factory.createOMElement("field", null);
+        qty.addAttribute(factory.createOMAttribute("id", null, "38"));
+        factory.createOMText(qty, qtyValue);
+        body.addChild(qty);
+
+        OMElement ordType = factory.createOMElement("field", null);
+        ordType.addAttribute(factory.createOMAttribute("id", null, "40"));
+        factory.createOMText(ordType, "1");
+        body.addChild(ordType);
+
+        OMElement side = factory.createOMElement("field", null);
+        side.addAttribute(factory.createOMAttribute("id", null, "54"));
+        factory.createOMText(side, mode);
+        body.addChild(side);
+
+        OMElement symbol = factory.createOMElement("field", null);
+        symbol.addAttribute(factory.createOMAttribute("id", null, "55"));
+        factory.createOMText(symbol, text);
+        body.addChild(symbol);
+
+        OMElement timeInForce = factory.createOMElement("field", null);
+        timeInForce.addAttribute(factory.createOMAttribute("id", null, "59"));
+        factory.createOMText(timeInForce, "0");
+        body.addChild(timeInForce);
+
+        return body;
+    }
+
+}

Propchange: synapse/trunk/java/modules/samples/src/main/java/samples/userguide/FIXClient.java
------------------------------------------------------------------------------
    svn:executable = *

Modified: synapse/trunk/java/modules/samples/src/main/scripts/build.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/samples/src/main/scripts/build.xml?rev=648629&r1=648628&r2=648629&view=diff
==============================================================================
--- synapse/trunk/java/modules/samples/src/main/scripts/build.xml (original)
+++ synapse/trunk/java/modules/samples/src/main/scripts/build.xml Wed Apr 16 02:01:38 2008
@@ -61,6 +61,12 @@
         ant optimizeclient [-Dopt_mode=mtom | swa]
             [-Dopt_url=http://localhost:8080/soap/MTOMSwASampleService]
             [-Dopt_file=./../../repository/conf/sample/resources/mtom/asf-logo.gif]
+
+    ant fixclient
+        A client which could post a FIX message (of type Order-Single) embedded into a SOAP message.
+
+	example:
+        ant fixclient -Dsymbol=IBM -Dqty=5 -Dmode=buy -Daddurl=http://localhost:8080/soap/FIXProxy
     </echo>
     </target>
 
@@ -83,6 +89,7 @@
     <property name="opt_url" value=""/>
     <property name="opt_file" value=""/>
     <property name="class.dir" value="target/classes"/>
+    <property name="qty" value=""/>
 
     <target name="clean">
         <delete dir="target" quiet="true"/>
@@ -136,6 +143,22 @@
         </java>
     </target>
 
+    <target name="fixclient" depends="compile">
+        <java classname="samples.userguide.FIXClient"
+             classpathref="javac.classpath" fork="true">
+
+            <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="qty"    value="${qty}"/>
+            <sysproperty key="repository" value="${repository}"/>
+            <sysproperty key="java.io.tmpdir" value="./../../work/temp/sampleClient"/>
+
+        </java>
+    </target>
+
     <target name="optimizeclient" depends="compile">
         <java classname="samples.userguide.MTOMSwAClient"
               classpathref="javac.classpath" fork="true">
@@ -199,4 +222,4 @@
         </javac>
     </target>
 
-</project>
\ No newline at end of file
+</project>

Added: synapse/trunk/java/repository/conf/sample/synapse_sample_257.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/repository/conf/sample/synapse_sample_257.xml?rev=648629&view=auto
==============================================================================
--- synapse/trunk/java/repository/conf/sample/synapse_sample_257.xml (added)
+++ synapse/trunk/java/repository/conf/sample/synapse_sample_257.xml Wed Apr 16 02:01:38 2008
@@ -0,0 +1,38 @@
+<!--
+  ~  Licensed to the Apache Software Foundation (ASF) under one
+  ~  or more contributor license agreements.  See the NOTICE file
+  ~  distributed with this work for additional information
+  ~  regarding copyright ownership.  The ASF licenses this file
+  ~  to you under the Apache License, Version 2.0 (the
+  ~  "License"); you may not use this file except in compliance
+  ~  with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing,
+  ~  software distributed under the License is distributed on an
+  ~   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~  KIND, either express or implied.  See the License for the
+  ~  specific language governing permissions and limitations
+  ~  under the License.
+  -->
+
+<!-- Introduction to FIX Proxy services in Synapse -->
+
+<definitions xmlns="http://ws.apache.org/ns/synapse">
+   <proxy name="OrderProcesserProxy40" transports="fix">
+      <target>
+         <endpoint>
+            <address uri="fix://localhost:19876?BeginString=FIX.4.0&amp;SenderCompID=SYNAPSE&amp;TargetCompID=EXEC"/>
+         </endpoint>
+         <inSequence><log level="full"/></inSequence>
+         <outSequence><log level="full"/><send/></outSequence>
+      </target>
+         
+      <parameter name="transport.fix.AcceptorConfigURL">file:/home/hiranya/Desktop/fix-config/fix-synapse.cfg</parameter>
+      <parameter name="transport.fix.AcceptorMessageStore">file</parameter>               
+      <parameter name="transport.fix.InitiatorConfigURL">file:/home/hiranya/Desktop/fix-config/synapse-sender.cfg</parameter>
+      <parameter name="transport.fix.InitiatorMessageStore">file</parameter>           
+   </proxy>
+</definitions>
+

Propchange: synapse/trunk/java/repository/conf/sample/synapse_sample_257.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: synapse/trunk/java/repository/conf/sample/synapse_sample_258.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/repository/conf/sample/synapse_sample_258.xml?rev=648629&view=auto
==============================================================================
--- synapse/trunk/java/repository/conf/sample/synapse_sample_258.xml (added)
+++ synapse/trunk/java/repository/conf/sample/synapse_sample_258.xml Wed Apr 16 02:01:38 2008
@@ -0,0 +1,44 @@
+<!--
+  ~  Licensed to the Apache Software Foundation (ASF) under one
+  ~  or more contributor license agreements.  See the NOTICE file
+  ~  distributed with this work for additional information
+  ~  regarding copyright ownership.  The ASF licenses this file
+  ~  to you under the Apache License, Version 2.0 (the
+  ~  "License"); you may not use this file except in compliance
+  ~  with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing,
+  ~  software distributed under the License is distributed on an
+  ~   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~  KIND, either express or implied.  See the License for the
+  ~  specific language governing permissions and limitations
+  ~  under the License.
+  -->
+
+<!-- HTTP to FIX Proxy Service -->
+<definitions xmlns="http://ws.apache.org/ns/synapse">
+   <proxy name="FIXProxy">
+      <target>
+         <endpoint>
+            <address uri="fix://localhost:19876?BeginString=FIX.4.0&amp;SenderCompID=SYNAPSE&amp;TargetCompID=EXEC"/>
+         </endpoint>
+        
+         <inSequence>
+            <property name="transport.fix.ServiceName" value="FIXProxy" scope="axis2-client" />
+            <log level="full"/>
+         </inSequence>
+             
+         <outSequence>
+            <log level="full"/>
+            <send/>
+         </outSequence>            
+      </target>
+
+      <parameter name="transport.fix.InitiatorConfigURL">file:/home/hiranya/Desktop/fix-config/synapse-sender.cfg</parameter>
+      <parameter name="transport.fix.InitiatorMessageStore">file</parameter>
+      <parameter name="transport.fix.SendAllToInSequence">false</parameter>
+   </proxy>
+</definitions>
+

Propchange: synapse/trunk/java/repository/conf/sample/synapse_sample_258.xml
------------------------------------------------------------------------------
    svn:executable = *

Modified: synapse/trunk/java/src/site/xdoc/Synapse_Samples.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/src/site/xdoc/Synapse_Samples.xml?rev=648629&r1=648628&r2=648629&view=diff
==============================================================================
--- synapse/trunk/java/src/site/xdoc/Synapse_Samples.xml (original)
+++ synapse/trunk/java/src/site/xdoc/Synapse_Samples.xml Wed Apr 16 02:01:38 2008
@@ -296,6 +296,14 @@
               <a href="#Sample256">Sample 256: Proxy services with the mail
               transport</a>
             </li>
+	    <li>
+              <a href="#Sample257">Sample 257: Proxy services with the FIX
+              transport</a>
+            </li>
+	    <li>
+              <a href="#Sample258">Sample 258: Switching from HTTP to FIX
+              </a>
+            </li>
           </ul>
         </li>
         <li>
@@ -3417,6 +3425,142 @@
       After a few seconds (e.g. 30s), you should receive a POX response in your
       email account with the stock quote reply.
     </p>
+
+    <h2>
+      <a name="Sample257" id="Sample257">Sample 257: Proxy services with the
+      FIX transport </a>
+    </h2>
+<pre xml:space="preserve">&lt;!-- Using the FIX transport --&gt;
+&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+    &lt;proxy name="FIXProxy" transports="fix"&gt;
+
+        &lt;parameter name="transport.fix.AcceptorConfigURL"&gt;file:/home/synapse_user/fix-config/fix-synapse.cfg&lt;/parameter&gt;
+        &lt;parameter name="transport.fix.InitiatorConfigURL"&gt;file:/home/synapse_user/fix-config/synapse-sender,cfg&lt;/parameter&gt;
+        &lt;parameter name="transport.fix.AcceptorMessageStore"&gt;file&lt;/parameter&gt;
+        &lt;parameter name="transport.fix.InitiatorMessageStore"&gt;file&lt;/parameter&gt;
+
+        &lt;target&gt;
+            &lt;endpoint&gt;
+                &lt;address uri="fix://localhost:19876?BeginString=FIX.4.0&amp;SenderCompID=SYNAPSE&amp;TargetCompID=EXEC"/&gt;
+            &lt;/endpoint&gt;
+	    &lt;inSequence&gt;
+		&lt;log level="full"/&gt;
+	    &lt;/inSequence&gt;
+            &lt;outSequence&gt;
+                &lt;log level="full"/&gt;
+		&lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+    &lt;/proxy&gt;
+&lt;/definitions&gt; </pre>
+    <p>
+      <strong>Objective: Using the FIX (Financial Information eXchange) transport with Proxy services</strong>
+    </p>
+    <p>
+      <strong>Prerequisites:</strong><br/> 
+       You will need the two sample FIX applications that come with Quickfix/J
+       (Banzai and Executor). Configure the two applications to establish
+       sessions with Synapse. See <a href="Synapse_Samples_Setup.xml#fixsamplesconfig">
+       Configuring Sample FIX Applications</a>
+    </p>
+    <p>
+      Start Banzai and Executor
+    </p>
+    <p>
+      Enable FIX transport in the Synapse axis2.xml. See <a
+      href="Synapse_Samples_Setup.xml#fixtransport">Setting up FIX transport
+      </a>
+    </p>
+    <p>
+      Configure Synapse for FIX samples. See <a href="Synapse_Samples_Setup.xml#fixsamples">
+      Configuring Synapse for FIX Samples</a>
+    </p>
+    <p>
+      Open up the SYNAPSE_HOME/repository/conf/sample/synapse_sample_257.xml file 
+      and make sure that transport.fix.AcceptorConfigURL property points to the
+      fix-synapse.cfg file you created. Also make sure that transport.fix.
+      InitiatorConfigURL property points to the synapse-sender.cfg file you
+      created. Once done you can start the Synapse configuration numbered 257:
+      i.e. synapse -sample 257. Note that Synapse creates a new FIX session with
+      Banzai at this point.
+    </p>
+    <p>
+      Send an order request from Banzai to Synapse.
+    </p>
+    <p>
+      Synapse will create a session with Executor and forward the order request. The
+      responses coming from the Executor will be sent back to Banzai. It will take a
+      couple of seconds for the responses to arrive for the first request since Synapse
+      has to establish a session with the Executor. But all the subsequent messages
+      will pass through almost instantaneously.
+    </p>
+    <h2>
+      <a name="Sample258" id="Sample258">Sample 258: Switching from HTTP to FIX </a>
+    </h2>
+<pre xml:space="preserve">
+&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+    &lt;proxy name="FIXProxy"&gt;
+
+        &lt;parameter name="transport.fix.InitiatorConfigURL"&gt;file:/home/synapse_user/fix-config/synapse-sender,cfg&lt;/parameter&gt;
+        &lt;parameter name="transport.fix.InitiatorMessageStore"&gt;file&lt;/parameter&gt;
+        &lt;parameter name="transport.fix.SendAllToInSequence"&gt;false&lt;/parameter&gt;
+
+        &lt;target&gt;
+            &lt;endpoint&gt;
+                &lt;address uri="fix://localhost:19876?BeginString=FIX.4.0&amp;SenderCompID=SYNAPSE&amp;TargetCompID=EXEC"/&gt;
+            &lt;/endpoint&gt;
+	    &lt;inSequence&gt;
+	    	&lt;property name="transport.fix.ServiceName" value="FIXProxy" scope="axis2-client"/&gt;
+			&lt;log level="full"/&gt;
+	    &lt;/inSequence&gt;
+        &lt;outSequence&gt;
+            &lt;log level="full"/&gt;
+			&lt;send/&gt;
+        &lt;/outSequence&gt;
+        &lt;/target&gt;
+    &lt;/proxy&gt;
+&lt;/definitions&gt; </pre>
+    <p>
+      <strong>Objective: Demonstrate switching from HTTP to FIX</strong>
+    </p>
+    <p>
+      <strong>Prerequisites:</strong><br/> 
+       You will need the Executor sample application that comes with Quickfix/J.
+       Configure Executor to establish a session with Synapse. See <a href=
+       "Synapse_Samples_Setup.xml#fixsamplesconfig">Configuring Sample FIX 
+       Applications</a>
+    </p>
+    <p>
+      Start Executor.
+    </p>
+    <p>
+      Enable FIX transport sender in the Synapse axis2.xml. See <a
+      href="Synapse_Samples_Setup.xml#fixtransport">Setting up FIX transport
+      </a>
+    </p>
+    <p>
+      Configure Synapse for FIX samples. See <a href="Synapse_Samples_Setup.xml#fixsamples">
+      Configuring Synapse for FIX Samples</a>. There is no need to create the fix-synapse.cfg
+      file for this sample. Having only the synapse-sender.cfg file is sufficient.
+    </p>
+    <p>
+      Go to the SYNAPSE_HOME/repository/conf/sample/synapse_sample_258.xml 
+      file and make sure that transport.fix.InitiatorConfigURL property
+      points to the synapse-sender.cfg file you created. Once done you can
+      start the Synapse configuration numbered 258: i.e. synapse -sample 258
+    </p>
+    <p>
+      Invoke the FIX Client as follows. This command sends a FIX message
+      embedded in a SOAP message over HTTP.
+      <pre>ant fixclient -Dsymbol=IBM -Dqty=5 -Dmode=buy -Daddurl=http://localhost:8080/soap/FIXProxy</pre>
+    </p>
+    <p>
+      Synapse will create a session with Executor and forward the order request. The
+      first response coming from the Executor will be sent back over HTTP. Executor 
+      generally sends two responses for each incoming order request. But since the
+      response has to be forwarded over HTTP only one can be sent back to the client. 
+    </p>
+
     <h1>
       <a name="Task" id="Task">Introduction to synapse tasks</a>
     </h1>
@@ -5166,4 +5310,4 @@
 <pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/soap/SimpleStockQuoteService -Dtrpurl=http://localhost:8080/</pre>
     </div>
   </body>
-</document>
\ No newline at end of file
+</document>

Modified: synapse/trunk/java/src/site/xdoc/Synapse_Samples_Setup.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/src/site/xdoc/Synapse_Samples_Setup.xml?rev=648629&r1=648628&r2=648629&view=diff
==============================================================================
--- synapse/trunk/java/src/site/xdoc/Synapse_Samples_Setup.xml (original)
+++ synapse/trunk/java/src/site/xdoc/Synapse_Samples_Setup.xml Wed Apr 16 02:01:38 2008
@@ -546,6 +546,125 @@
         &lt;parameter name="mail.smtp.from"&gt;synapse.demo.0@gmail.com&lt;/parameter&gt;
     &lt;/transportSender&gt;</pre>
     <p/>
+    <h2 id="fixtransport">
+      Setting up FIX Transport
+    </h2>
+    <p>
+	To run the FIX samples used in this guide you need a local Quickfix/J
+	installation.
+    </p>
+    <p>
+      To enable the FIX transport for samples, you need to uncomment the FIX
+      transport sender and FIX transport receiver configurations in the 
+      repository/conf/axis2.xml. Simply locate and uncomment the FIXTransportSender
+      and FIXTransportListener sample configurations.
+    </p>
+    <p/>
+    <h2 id="fixsamples">
+      Configuring Synapse for FIX Samples
+    </h2>
+    <p>
+      Put the following entries in a file called fix-synapse.cfg
+      <pre>
+	[default]
+	FileStorePath=examples/target/data/synapse-acceptor
+	ConnectionType=acceptor
+	StartTime=00:00:00
+	EndTime=00:00:00
+	HeartBtInt=30
+	ValidOrderTypes=1,2,F
+	SenderCompID=SYNAPSE
+	TargetCompID=BANZAI
+	UseDataDictionary=Y
+	DefaultMarketPrice=12.30
+
+	[session]
+	BeginString=FIX.4.0
+	SocketAcceptPort=9876		
+      </pre>
+    </p>
+    <p>
+      Put the following entries in a file called synapse-sender.cfg
+      <pre>
+	[default]
+	FileStorePath=examples/target/data/synapse-initiator
+	SocketConnectHost=localhost
+	StartTime=00:00:00
+	EndTime=00:00:00
+	HeartBtInt=30
+	ReconnectInterval=5
+      </pre>
+    </p>
+    <p>
+	The FileStorePath property in the above two files should point
+        to two directories in your local file system. Once the samples
+        are executed, Synapse will create FIX message stores in these two
+        directories.
+    </p>
+    <p/>
+    <h2 id="fixsamplesconfig">
+      Configuring Sample FIX Applications
+    </h2>
+    <p>
+      Locate and edit the FIX configuration file of Executor to be as follows.
+      This file is usually named executor.cfg
+      <pre>
+	[default]
+	FileStorePath=examples/target/data/executor
+	ConnectionType=acceptor
+	StartTime=00:00:00
+	EndTime=00:00:00
+	HeartBtInt=30
+	ValidOrderTypes=1,2,F
+	SenderCompID=EXEC
+	TargetCompID=SYNAPSE
+	UseDataDictionary=Y
+	DefaultMarketPrice=12.30
+
+	[session]
+	BeginString=FIX.4.0
+	SocketAcceptPort=19876		
+      </pre>
+    </p>
+    <p>
+      Locate and edit the FIX configuration file of Banzai to be as follows.
+      This file is usually named banzai.cfg
+      <pre>
+	[default]
+	FileStorePath=examples/target/data/banzai
+	ConnectionType=initiator
+	SenderCompID=BANZAI
+	TargetCompID=SYNAPSE
+	SocketConnectHost=localhost
+	StartTime=00:00:00
+	EndTime=00:00:00
+	HeartBtInt=30
+	ReconnectInterval=5
+
+	[session]
+	BeginString=FIX.4.0
+	SocketConnectPort=9876
+      </pre>
+    </p>
+    <p>
+	The FileStorePath property in the above two files should point
+        to two directories in your local file system.
+    </p>
+    <p>
+	If you are using a binary distribution of Quickfix/J, the two
+	samples and their configuration files are all packed to a 
+	single jar file called quickfixj-examples.jar. You will have to
+	extract the jar file, modify the configuration files and pack
+	them to a jar file again under the same name.
+    </p>
+    <p>
+    For more information regarding the FIX sample applications please
+    refer the <a href="http://www.quickfixj.org/quickfixj/usermanual/usage/examples.html">Example Applications</a> section in the Quickfix/J
+    documentation. For more information on configuring Quickfix/J applications
+    refer the <a href="http://www.quickfixj.org/quickfixj/usermanual/usage/configuration.html">Configuring Quickfix/J</a> section of the Quickfix/J 
+    documentation.
+    </p>
+    <p/>
     <h2 id="script">
       Configuring Synapse for Script Mediator Support
     </h2>
@@ -690,4 +809,4 @@
 </div>
 </div>
 </body>
-</document>
\ No newline at end of file
+</document>