You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@synapse.apache.org by hi...@apache.org on 2010/12/14 22:38:39 UTC

svn commit: r1049289 - in /synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide: samples.xml samples/sample256.xml samples/sample257.xml samples/sample258.xml

Author: hiranya
Date: Tue Dec 14 21:38:39 2010
New Revision: 1049289

URL: http://svn.apache.org/viewvc?rev=1049289&view=rev
Log:
Samples 256, 257, 258


Modified:
    synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples.xml
    synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample256.xml
    synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample257.xml
    synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample258.xml

Modified: synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples.xml?rev=1049289&r1=1049288&r2=1049289&view=diff
==============================================================================
--- synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples.xml (original)
+++ synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples.xml Tue Dec 14 21:38:39 2010
@@ -106,9 +106,9 @@
                         <li><a href="samples/sample253.html">Sample 253: One way bridging from JMS to http and replying with a 202 Accepted response</a></li>
                         <li><a href="samples/sample254.html">Sample 254: Using file system as the transport medium (reading/writing files)</a></li>
                         <li><a href="samples/sample255.html">Sample 255: Switching from file transport (ftp) to the mail transport</a></li>
-                        <li><a href="">Sample 256: Proxy services with the mail transport</a></li>
-                        <li><a href="">Sample 257: Proxy services with the FIX transport</a></li>
-                        <li><a href="">Sample 258: Switching from HTTP to FIX </a></li>
+                        <li><a href="samples/sample256.html">Sample 256: Proxy services with the mail transport</a></li>
+                        <li><a href="samples/sample257.html">Sample 257: Proxy services with the FIX transport</a></li>
+                        <li><a href="samples/sample258.html">Sample 258: Switching from HTTP to FIX </a></li>
                         <li><a href="">Sample 259: Switching from FIX to HTTP </a></li>
                         <li><a href="">Sample 260: Switching from FIX to AMQP </a></li>
                         <li><a href="">Sample 261: Switch between FIX versions </a></li>

Modified: synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample256.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample256.xml?rev=1049289&r1=1049288&r2=1049289&view=diff
==============================================================================
--- synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample256.xml (original)
+++ synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample256.xml Tue Dec 14 21:38:39 2010
@@ -23,7 +23,7 @@
         <title>Apache Synapse - Sample 256</title>
     </properties>
     <body>
-        <section name="Sample 256: ">
+        <section name="Sample 256: Proxy Services with the Mail Transport">
             <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
 
     &lt;proxy name="StockQuoteProxy" transports="mailto"&gt;
@@ -69,16 +69,25 @@
 &lt;/definitions&gt;</div>
             <subsection name="Objective">
                 <p>
-
+                    This sample show cases the mail transport of Synapse. The mail transport allows
+                    Synapse to receive and send e-mails using common protocols like POP, IMAP and
+                    SMTP.
                 </p>
             </subsection>
             <subsection name="Pre-requisites">
                 <p>
                     <ul>
                         <li>
+                            You need access to an e-mail account to try out this sample
+                        </li>
+                        <li>
                             Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
                         </li>
                         <li>
+                            Enable the mail transport listener and mail transport sender for Synapse
+                            (refer mail transport setup guide for more details)
+                        </li>
+                        <li>
                             Start Synapse using the configuration numbered 256 (repository/conf/sample/synapse_sample_256.xml)
                             <div class="command">
                                 Unix/Linux: sh synapse.sh -sample 256<br/>
@@ -89,11 +98,33 @@
                 </p>
             </subsection>
             <subsection name="Executing the Client">
-                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</div>
-
-                <div class="consoleOutput">Sat Nov 18 21:01:23 IST 2006 SimpleStockQuoteService :: Generating quote for : IBM</div>
-
-                <div class="consoleOutput">Standard :: Stock price = $95.26454380258552</div>
+                <p>
+                    Send an e-mail to <a href="mailto:synapse.demo.1@gmail.com">synapse.demo.1@gmail.com</a>
+                    with the following payload.
+                </p>
+                <div class="xmlConf">&lt;getQuote xmlns=&quot;http://services.samples&quot;&gt;
+   &lt;request xmlns=&quot;http://services.samples/xsd&quot;&gt;
+       &lt;symbol&gt;IBM&lt;/symbol&gt;
+   &lt;/request&gt;
+&lt;/getQuote&gt;</div>
+                <p>
+                    Synapse will be polling on the above e-mail account for any incoming requests. When
+                    your mail arrives at this account, Synapse will pick it up and send the payload to
+                    Axis2 over HTTP. The response will be mailed back to your e-mail account. Synapse
+                    retrieves the sender information from the original request to determine the recipient
+                    of the response mail.
+                </p>
+                <p>
+                    Note that in this sample we used the transport.mail.ContentType property to make
+                    sure that the transport parses the request message as POX. If you remove this
+                    property, you may still be able to send requests using a standard mail client if
+                    instead of writing the XML in the body of the message, you add it as an attachment.
+                    In that case, you should use .xml as a suffix for the attachment and format the
+                    request as a SOAP 1.1 message. Indeed, for a file with suffix .xml the mail client
+                    will most likely use text/xml as the content type, exactly as required for SOAP 1.1.
+                    Sending a POX message using this approach will be a lot trickier, because most
+                    standard mail clients don't allow the user to explicitly set the content type.
+                </p>
             </subsection>
         </section>
         <p><a href="../samples.html">Back to Catalog</a></p>        

Modified: synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample257.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample257.xml?rev=1049289&r1=1049288&r2=1049289&view=diff
==============================================================================
--- synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample257.xml (original)
+++ synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample257.xml Tue Dec 14 21:38:39 2010
@@ -23,7 +23,7 @@
         <title>Apache Synapse - Sample 257</title>
     </properties>
     <body>
-        <section name="Sample 257: ">
+        <section name="Sample 257: Proxy Services with the FIX Transport">
             <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
 
     &lt;proxy name="OrderProcesserProxy40" transports="fix"&gt;
@@ -54,14 +54,27 @@
 &lt;/definitions&gt;</div>
             <subsection name="Objective">
                 <p>
-
+                    This sample demonstrates the FIX (Financial Information eXchange) transport of
+                    Synapse. FIX transport allows Synapse to connect to remote FIX acceptors and
+                    initiators and exchange finance data.
                 </p>
             </subsection>
             <subsection name="Pre-requisites">
                 <p>
                     <ul>
                         <li>
-                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                            You need a <a href="http://www.quickfixj.org">Quickfix/J</a> installation
+                            to try out FIX samples. Pleas download and extract a Quickfix/J distribution
+                            into your local machine.
+                        </li>
+                        <li>
+                            Configure the Executor sample FIX application (shipped with Quickfix/J)
+                            to receive messages from Synapse and start it (refer FIX setup guide for
+                            more details).
+                        </li>
+                        <li>
+                            Enable the FIX transport listener and sender for Synapse (refer FIX setup
+                            guide for details).
                         </li>
                         <li>
                             Start Synapse using the configuration numbered 257 (repository/conf/sample/synapse_sample_257.xml)
@@ -69,16 +82,34 @@
                                 Unix/Linux: sh synapse.sh -sample 257<br/>
                                 Windows: synapse.bat -sample 257
                             </div>
+                            If Executor is properly configured, Synapse should establish a FIX session
+                            with the Executor upon startup. You should see some log entries confirming
+                            the session logon event on Synapse console as well as Executor console.
+                        </li>
+                        <li>
+                            Configure Banzai sample FIX application (shipped with Quickfix/J) to send
+                            messages to Synapse and start it (refer FIX setup guide for more details).
+                            If Banzai was properly configured, it should establish a FIX session with
+                            Synapse upon startup. You should see some session logon messages on Synapse
+                            console and Banzai console.
                         </li>
                     </ul>
                 </p>
             </subsection>
             <subsection name="Executing the Client">
-                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</div>
-
-                <div class="consoleOutput">Sat Nov 18 21:01:23 IST 2006 SimpleStockQuoteService :: Generating quote for : IBM</div>
-
-                <div class="consoleOutput">Standard :: Stock price = $95.26454380258552</div>
+                <p>
+                    Send some FIX messages from Banzai to Synapse. Synapse will forward all requests
+                    to Executor and get them processes. Responses from Executor will be routed back
+                    to Banzai.
+                </p>
+                <p>
+                    Synapse converts all received FIX messages into SOAP format. You can view these
+                    SOAP messages from the Synapse log. When SOAP messages are sent to FIX endpoints,
+                    Synapse converts them back into valid FIX messages. While FIX messages are flowing
+                    through the service bus, you can perform various transformations and content based
+                    routing on the FIX messages using the existing mediators like XSLT, XQuery, Filter
+                    and Switch.
+                </p>
             </subsection>
         </section>
         <p><a href="../samples.html">Back to Catalog</a></p>        

Modified: synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample258.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample258.xml?rev=1049289&r1=1049288&r2=1049289&view=diff
==============================================================================
--- synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample258.xml (original)
+++ synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample258.xml Tue Dec 14 21:38:39 2010
@@ -23,7 +23,7 @@
         <title>Apache Synapse - Sample 258</title>
     </properties>
     <body>
-        <section name="Sample 258: ">
+        <section name="Sample 258: Switching from HTTP to FIX">
             <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
 
     &lt;proxy name="FIXProxy" transports="http"&gt;
@@ -55,14 +55,26 @@
 &lt;/definitions&gt;</div>
             <subsection name="Objective">
                 <p>
-
+                    Demonstrates how to use the FIX transport in a transport switching scenario with
+                    HTTP.
                 </p>
             </subsection>
             <subsection name="Pre-requisites">
                 <p>
                     <ul>
                         <li>
-                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                            You need a <a href="http://www.quickfixj.org">Quickfix/J</a> installation
+                            to try out FIX samples. Pleas download and extract a Quickfix/J distribution
+                            into your local machine.
+                        </li>
+                        <li>
+                            Configure the Executor sample FIX application (shipped with Quickfix/J)
+                            to receive messages from Synapse and start it (refer FIX setup guide for
+                            more details).
+                        </li>
+                        <li>
+                            Enable the FIX transport sender for Synapse (refer FIX setup guide for
+                            details).
                         </li>
                         <li>
                             Start Synapse using the configuration numbered 258 (repository/conf/sample/synapse_sample_258.xml)
@@ -75,11 +87,19 @@
                 </p>
             </subsection>
             <subsection name="Executing the Client">
-                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</div>
-
-                <div class="consoleOutput">Sat Nov 18 21:01:23 IST 2006 SimpleStockQuoteService :: Generating quote for : IBM</div>
-
-                <div class="consoleOutput">Standard :: Stock price = $95.26454380258552</div>
+                <p>
+                    Go to the samples/axis2Client directory and invoke the sample FIX/HTTP client as
+                    follows.
+                </p>
+                <div class="command">ant fixclient -Dsymbol=IBM -Dqty=5 -Dmode=buy -Daddurl=http://localhost:8280/services/FIXProxy</div>
+                <p>
+                    This command sends a HTTP request to the FIXProxy on Synapse. The message is
+                    converted into a FIX message and sent to the Executor sample application. Executor
+                    will send two responses for this request (receive ack and the execution report) and
+                    Synapse will send the first response back to the HTTP client. (Synapse can't send
+                    both responses back, since HTTP does not allow sending two responses to the same
+                    request)
+                </p>
             </subsection>
         </section>
         <p><a href="../samples.html">Back to Catalog</a></p>