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 04:13:28 UTC

svn commit: r1048918 - in /synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide: samples.xml samples/sample254.xml samples/sample255.xml

Author: hiranya
Date: Tue Dec 14 03:13:27 2010
New Revision: 1048918

URL: http://svn.apache.org/viewvc?rev=1048918&view=rev
Log:
samples 254, 255


Modified:
    synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples.xml
    synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample254.xml
    synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample255.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=1048918&r1=1048917&r2=1048918&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 03:13:27 2010
@@ -104,8 +104,8 @@
                         <li><a href="samples/sample251.html">Sample 251: Switching from http/s to JMS</a></li>
                         <li><a href="samples/sample252.html">Sample 252: Pure text, binary and POX message support with JMS</a></li>
                         <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="">Sample 254: Using the file system as transport medium using VFS transport listener and sender</a></li>
-                        <li><a href="">Sample 255: Switching from ftp transport listener to mail transport sender</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>

Modified: synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample254.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample254.xml?rev=1048918&r1=1048917&r2=1048918&view=diff
==============================================================================
--- synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample254.xml (original)
+++ synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample254.xml Tue Dec 14 03:13:27 2010
@@ -23,7 +23,7 @@
         <title>Apache Synapse - Sample 254</title>
     </properties>
     <body>
-        <section name="Sample 254: ">
+        <section name="Sample 254: Using File System as the Transport Medium (Reading/Writing Files)">
             <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
 
     &lt;proxy name="StockQuoteProxy" transports="vfs"&gt;
@@ -59,7 +59,10 @@
 &lt;/definitions&gt;</div>
             <subsection name="Objective">
                 <p>
-
+                    Synapse can access the local file system using its VFS (Virtual File System)
+                    transport receiver and sender. This way Synapse can read files in the local file
+                    system as well as write to the local file system. This sample show cases the
+                    Synapse VFS transport in action.
                 </p>
             </subsection>
             <subsection name="Pre-requisites">
@@ -69,6 +72,25 @@
                             Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
                         </li>
                         <li>
+                            Create 3 new directories (folders) named 'in', 'out' and 'original' in a
+                            suitable location in the local file system (eg: /home/user/test). 
+                        </li>
+                        <li>
+                            Open the repository/conf/sample/synapse_sample_254.xml file in a text
+                            editor and. Then change the transport.vfs.FileURI, transport.vfs.MoveAfterProcess,
+                            transport.vfs.MoveAfterFailure parameter values to the above in, original
+                            and original directories respectively. Note that both 2nd and 3rd parameters
+                            are pointed to the 'original' directory.
+                        </li>
+                        <li>
+                            Change the endpoint in the out-sequence to point to the 'out' directory.
+                            The prefix 'vfs' in the endpoint URL must not be removed or changed.
+                        </li>
+                        <li>
+                            Enable the VFS transport receiver and sender for Synapse (refer VFS
+                            setup guide for more information)
+                        </li>
+                        <li>
                             Start Synapse using the configuration numbered 254 (repository/conf/sample/synapse_sample_254.xml)
                             <div class="command">
                                 Unix/Linux: sh synapse.sh -sample 254<br/>
@@ -79,11 +101,26 @@
                 </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>
+                    Copy the test.xml file in the repository/conf/sample/resources/vfs directory to
+                    the directory given in transport.vfs.FileURI above (i.e the 'in' directory). This
+                    file contains a simple stock quote request in XML/SOAP format.
+                </p>
+                <div class="consoleOutput">&lt;?xml version='1.0' encoding='UTF-8'?&gt;
+    &lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:wsa=&quot;http://www.w3.org/2005/08/addressing&quot;&gt;
+    &lt;soapenv:Body&gt;
+            &lt;m0:getQuote xmlns:m0=&quot;http://services.samples&quot;&gt;
+                    &lt;m0:request&gt;
+                            &lt;m0:symbol&gt;IBM&lt;/m0:symbol&gt;
+                    &lt;/m0:request&gt;
+            &lt;/m0:getQuote&gt;
+    &lt;/soapenv:Body&gt;
+&lt;/soapenv:Envelope&gt;</div>
+                <p>
+                    VFS transport listener will pick the file from 'in' directory and send it to the
+                    Axis2 service over HTTP. The request XML file will be backed up in the 'original'
+                    directory. The response from the Axis2 server will be saved to the 'out' directory.
+                </p>
             </subsection>
         </section>
         <p><a href="../samples.html">Back to Catalog</a></p>        

Modified: synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample255.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample255.xml?rev=1048918&r1=1048917&r2=1048918&view=diff
==============================================================================
--- synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample255.xml (original)
+++ synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample255.xml Tue Dec 14 03:13:27 2010
@@ -23,7 +23,7 @@
         <title>Apache Synapse - Sample 255</title>
     </properties>
     <body>
-        <section name="Sample 255: ">
+        <section name="Sample 255: Switching from File Transport (FTP) to the Mail Transport">
             <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
 
     &lt;proxy name="StockQuoteProxy" transports="vfs"&gt;
@@ -55,16 +55,43 @@
 &lt;/definitions&gt;</div>
             <subsection name="Objective">
                 <p>
-
+                    In <a href="sample254.html">sample 254</a> we looked at how the VFS transport
+                    can be used to read files from the local file system. VFS transport can also be
+                    used to read files from FTP, SFTP and CIFS sites. This sample illustrates how to
+                    read from a remote FTP site and send the content to a remote client as an e-mail.                    
                 </p>
             </subsection>
             <subsection name="Pre-requisites">
                 <p>
                     <ul>
+                       <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> <li>
+                            This sample requires access to a FTP site and an e-mail account.
+                        </li>
                         <li>
                             Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
                         </li>
                         <li>
+                            Enable the VFS transport listener for Synapse (refer VFS setup guide for
+                            more details).
+                        </li>
+                        <li>
+                            Enable the mail transport sender for Synapse (refer Mail transport setup
+                            guide for more details).
+                        </li>
+                        <li>
+                            Create a new test directory in the FTP site.
+                        </li>
+                        <li>
+                            Open the repository/conf/sample/synapse_sample_255.xml and edit the
+                            transport.vfs.FileURI parameter to point to the test directory in the FTP
+                            server. Also change the endpoint in the out sequence to point to your
+                            e-mail account.
+                        </li>
+                        <li>
                             Start Synapse using the configuration numbered 255 (repository/conf/sample/synapse_sample_255.xml)
                             <div class="command">
                                 Unix/Linux: sh synapse.sh -sample 255<br/>
@@ -75,11 +102,27 @@
                 </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>
+                    Copy the test.xml file in the repository/conf/sample/resources/vfs directory to
+                    the directory given in transport.vfs.FileURI above (i.e the test directory in
+                    FTP server). This file contains a simple stock quote request in XML/SOAP format.
+                </p>
+                <div class="consoleOutput">&lt;?xml version='1.0' encoding='UTF-8'?&gt;
+&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:wsa=&quot;http://www.w3.org/2005/08/addressing&quot;&gt;
+    &lt;soapenv:Body&gt;
+            &lt;m0:getQuote xmlns:m0=&quot;http://services.samples&quot;&gt;
+                    &lt;m0:request&gt;
+                            &lt;m0:symbol&gt;IBM&lt;/m0:symbol&gt;
+                    &lt;/m0:request&gt;
+            &lt;/m0:getQuote&gt;
+    &lt;/soapenv:Body&gt;
+&lt;/soapenv:Envelope&gt;</div>
+                <p>
+                    VFS transport will pick up the file from the FTP site and send the content to
+                    the stock quote service in Axis2 over HTTP. Response from Axis2 will be sent to
+                    the mail endpoint as an e-mail. It should show up in the configured e-mail account
+                    after a few seconds.
+                </p>
             </subsection>
         </section>
         <p><a href="../samples.html">Back to Catalog</a></p>