You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@synapse.apache.org by ka...@apache.org on 2011/12/23 12:55:09 UTC
svn commit: r1222651 [13/14] - in /synapse/branches/2.1: ./
modules/distribution/ modules/distribution/src/main/assembly/
modules/documentation/ modules/documentation/src/
modules/documentation/src/site/ modules/documentation/src/site/resources/
module...
Added: synapse/branches/2.1/modules/documentation/src/site/xdoc/userguide/samples/setup/fix.xml
URL: http://svn.apache.org/viewvc/synapse/branches/2.1/modules/documentation/src/site/xdoc/userguide/samples/setup/fix.xml?rev=1222651&view=auto
==============================================================================
--- synapse/branches/2.1/modules/documentation/src/site/xdoc/userguide/samples/setup/fix.xml (added)
+++ synapse/branches/2.1/modules/documentation/src/site/xdoc/userguide/samples/setup/fix.xml Fri Dec 23 11:55:05 2011
@@ -0,0 +1,225 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+ ~ 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.
+ -->
+
+<document>
+ <properties>
+ <title>Apache Synapse - FIX Setup Guide</title>
+ </properties>
+ <body>
+ <section name="FIX Setup Guide">
+ <p>
+ This document explains how to setup the FIX transport sender and listener
+ in Synapse as required by the samples. Further it describes how to setup the
+ sample FIX applications (Executor and Banzai) which are essential for trying
+ out the FIX samples.
+ </p>
+ </section>
+ <section name="Contents">
+ <ul>
+ <li><a href="#intro">Introduction</a></li>
+ <li><a href="#pre">Prerequisites</a></li>
+ <li><a href="#synapse">Enabling FIX Transport in Synapse</a></li>
+ <li><a href="#services">Configuring Services for FIX Transport</a></li>
+ <li>
+ <a href="#samples">Setting Up the Sample FIX Applications</a>
+ <ul>
+ <li><a href="#exec">Configuring the Executor</a></li>
+ <li><a href="#banzai">Configuring Banzai</a></li>
+ </ul>
+ </li>
+
+ </ul>
+ </section>
+ <section name="Introduction" id="intro">
+ <p>
+ <a href="http://www.fixprotocol.org">FIX (Financial Information eXchange)</a>
+ is a domain specific communication protocol widely used in the finance sector for
+ securities transactions. The protocol specification spans across the application layer
+ and the session layer of the OSI reference model of networking. Apache Synapse comes
+ with a FIX transport adapter which enables the Synapse ESB to communicate with FIX
+ acceptors and initiators. This allows users to seamlessly integrate FIX applications
+ together and even link FIX applications with other systems that use different protocols.
+ </p>
+ <p>
+ This article describes how to enable and configure the FIX transport listener and
+ sender for Apache Synapse. It also describes how to setup various sample FIX applications
+ required to try out the FIX protocol related examples.
+ </p>
+ </section>
+ <section name="Prerequisites" id="pre">
+ <p>
+ The FIX transport adapter of Synapse is built on top of the <a href="http://www.quickfixj.org">Quickfix/J</a>
+ open source FIX engine. Therefore the users must deploy the Quickfix/J libraries
+ into Synapse before using the FIX transport. Also in order to try out the FIX
+ samples described in this documentation, it is required to have the 2 sample FIX
+ applications (Banzai and Executor) that come bundled with Quickfix/J. Therefore as
+ the first step <a href="http://www.quickfixj.org/downloads/">download</a> the latest
+ binary distribution of Quickfix/J and extract the downloaded archive to a suitable
+ location on the local disk (let's refer to this location as QFJ_HOME).
+ </p>
+ <p>
+ All the necessary Quickfix/J libraries are available in the Quickfix/J binary
+ distribution. You have to copy the following jar files from Quickfix/J installation
+ to the 'lib' directory of Synapse.
+ </p>
+ <ul>
+ <li>quickfixj-core.jar</li>
+ <li>quickfixj-msg-fix40.jar</li>
+ <li>quickfixj-msg-fix41.jar</li>
+ <li>quickfixj-msg-fix42.jar</li>
+ <li>quickfixj-msg-fix43.jar</li>
+ <li>quickfixj-msg-fix44.jar</li>
+ <li>mina-core.jar</li>
+ <li>slf4j-api.jar</li>
+ </ul>
+ <p>
+ The last 2 jar files can be found in the QFJ_HOME/bin directory and all other
+ files should be available in the QFJ_HOME itself.
+ </p>
+ </section>
+ <section name="Enabling FIX Transport in Synapse" id="synapse">
+ <p>
+ FIX transport listener and the FIX transport sender of Synapse can be enabled by
+ uncommenting the following sections in the repository/conf/axis2.xml file.
+ </p>
+ <div class="xmlConf"><transportReceiver name="fix" class="org.apache.synapse.transport.fix.FIXTransportListener"/></div>
+ <div class="xmlConf"><transportSender name="fix" class="org.apache.synapse.transport.fix.FIXTransportSender"/></div>
+ <p>
+ This will initialize the FIX transport adapter and have it up and running to be
+ used by the proxy services. However some additional setting should be applied at
+ the service level before a service can make use of the FIX transport.
+ </p>
+ </section>
+ <section name="Configuring Services for FIX Transport" id="services">
+ <p>
+ When a service needs to be exposed over the FIX transport, we should add the
+ following parameter to the service configuration.
+ </p>
+ <div class="xmlConf"><parameter name="transport.fix.AcceptorConfigURL">url</parameter></div>
+ <p>
+ The value of this parameter must be a valid URL which points to a Quickfix/J session
+ configuration file. All the FIX sample configurations are already equipped with this
+ parameter and they are pointing to the sample Quickfix/J configuration files that
+ comes with Synapse. These files can be found in the repository/sample/resources/fix
+ directory. One such configuration file (fix-synapse.cfg) is shown below.
+ </p>
+ <div class="consoleOutput">[default]
+FileStorePath=repository/fix/store/acceptor
+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=9876</div>
+ <p>
+ One of the most important parameters in this configuration is the SocketAcceptPort
+ setting. This defines the port used by the Synapse proxy service to receive
+ incoming FIX messages.
+ </p>
+ <p>
+ As far as the FIX samples are considered you don't have to make any changes to
+ these Quickfix/J configuration files or the Synapse sample configurations. Default
+ settings should work out of the box without any issues. However some samples may
+ require you to make minor changes to these files.
+ </p>
+ </section>
+ <section name="Setting Up the Sample FIX Applications" id="samples">
+ <p>
+ Two sample FIX applications are available in the Quickfix/J binray distribution
+ which can be used to send and receive FIX messages. By default these applications
+ are configured to directly communicate with each other. So we should make a few
+ modifications to the configuration to get them to communicate with Synapse. The
+ binaries of these sample programs are available in the quickfixj-examples.jar file
+ in QFJ_HOME. Startup scripts needed to run them can be found in the QFJ_HOME/bin
+ directory.
+ </p>
+ <subsection name="Configuring the Executor" id="exec">
+ <p>
+ Executor is the sample acceptor program. To configure this application to
+ receive messages from Synapse, put the following entries to a file named
+ 'executor.cfg'.
+ </p>
+ <div class="consoleOutput">[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</div>
+ <p>
+ Note that TargetCompID parameter has been set to 'SYNAPSE' and the port number
+ has been set to 9876. You can launch the Executor using the above configuration
+ as follows.
+ </p>
+ <div class="command">Unix/Linux: sh executor.sh <path to executor.cfg><br/>
+Windows: executor.bat <path to executor.cfg></div>
+ <p>
+ For some samples you will have to make some minor modifications to this
+ configuration file.
+ </p>
+ </subsection>
+ <subsection name="Configuring Banzai" id="banzai">
+ <p>
+ Banzai is a sample FIX initiator that comes with Quickfix/J. This can be
+ used to send FIX messages to a defined FIX acceptor. In case of samples,
+ Synapse will act as the acceptor. In order to send messages to Synapse, we
+ should start Banzai using the following configuration.
+ </p>
+ <div class="consoleOutput">[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</div>
+ <p>
+ Note that TargetCompID has been set to 'SYNAPSE' and the socket connect port
+ is specified to be 9876, which is the port used by Synapse. To start Banzai
+ with this configuration, save the above in a file named 'banzai.cfg' and
+ launch the sample application as follows.
+ </p>
+ <div class="command">Unix/Linux: sh banzai.sh <path to banzai.cfg><br/>
+Windows: banzai.bat <path to banzai.cfg></div>
+ </subsection>
+ </section>
+ </body>
+</document>
\ No newline at end of file
Added: synapse/branches/2.1/modules/documentation/src/site/xdoc/userguide/samples/setup/index.xml
URL: http://svn.apache.org/viewvc/synapse/branches/2.1/modules/documentation/src/site/xdoc/userguide/samples/setup/index.xml?rev=1222651&view=auto
==============================================================================
--- synapse/branches/2.1/modules/documentation/src/site/xdoc/userguide/samples/setup/index.xml (added)
+++ synapse/branches/2.1/modules/documentation/src/site/xdoc/userguide/samples/setup/index.xml Fri Dec 23 11:55:05 2011
@@ -0,0 +1,390 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+ ~ 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.
+ -->
+
+<document>
+ <properties>
+ <title>Apache Synapse - Samples Setup Guide</title>
+ </properties>
+ <body>
+ <section name="Introduction">
+ <p>
+ Apache Synapse comes with a collection of working examples that demonstrates the
+ basic features of the Synapse ESB. In addition to the sample configurations, a set
+ of sample client applications and services are provided which can be used to try out
+ each of the examples. Most examples are self contained and can be run without any third
+ party applications or libraries. A set of Ant build files and scripts are provided
+ to make setting up the examples easier. A few examples however require deploying
+ certain external libraries and using third party client applications.
+ </p>
+ <p>
+ The main objectives of this article are:
+ <ul>
+ <li>Introduce the concept of Synapse samples</li>
+ <li>Describe how to setup the environment for running samples</li>
+ <li>Describe how to run the sample client applications and services</li>
+ <li>Describe how to deploy third party libraries when required</li>
+ </ul>
+ </p>
+ </section>
+ <section name="Prerequisites">
+ <p>
+ Following applications are required to run any sample that comes with Synapse.
+ Please make sure you have them properly installed and configured in your system.
+ </p>
+ <ul>
+ <li>Java Development Kit version 1.5 or higher (1.6 recommended)</li>
+ <li><a href="http://ant.apache.org">Apache Ant</a> version 1.6.5 or higher</li>
+ <li>
+ A command line interface such as 'Command Prompt' on Windows and the Bash shell
+ on Unix/Linux systems
+ </li>
+ </ul>
+ <p>
+ When installing Java, make sure you setup the 'JAVA_HOME' environment variable
+ properly. Also adding the JAVA_HOME/bin directory to the system path will make
+ running the samples much easier.
+ </p>
+ <p>
+ In addition to the applications listed above, some samples require setting up few
+ other external resources such as JMS brokers and database engines. You can find the
+ relevant documentation under the '<a href="#Setting_Up_Additional_Resources">Setting Up Additional Features</a>'
+ section.
+ </p>
+ <p>
+ It is also advisable to run Synapse in the debug mode when trying out the example
+ configurations. This will give you important runtime status information that can be
+ used to better understand the functionality of Synapse. To enable the debug mode,
+ open up the lib/log4j.properties file and specify 'DEBUG' logging mode for the
+ 'org.apache.synapse' package.
+ </p>
+ <div class="consoleOutput">log4j.category.org.apache.synapse=DEBUG</div>
+ </section>
+ <section name="Understanding the Samples">
+ <p>
+ A Synapse sample scenario is generally comprised of three elements.
+ </p>
+ <ul>
+ <li>
+ Sample Synapse configuration (an XML configuration file given as the input
+ of Synapse)
+ </li>
+ <li>
+ Sample service (an Axis2 based Web Service to which Synapse will send messages)
+ </li>
+ <li>
+ Sample client (an Axis2 based service client which is used to send requests to
+ Synapse)
+ </li>
+ </ul>
+ <subsection name="Sample Synapse Configurations">
+ <p>
+ All the sample Synapse configurations are housed under the repository/conf/sample
+ directory. These configuration files are named in the following format.
+ </p>
+ <div class="consoleOutput">synapse_sample_n.xml</div>
+ <p>
+ Here 'n' is a number which uniquely identifies the sample. This number can be passed
+ as an argument to the Synapse startup script in order to start Synapse with a particular
+ sample configuration. For an example to start Synapse with the configuration numbered
+ 100 (ie synapse_sample_100.xml) run one of the following commands in the command line
+ interface.
+ </p>
+ <div class="command">
+ Unix/Linux: sh synapse.sh -sample 100<br/>
+ Windows: synapse.bat -sample 100
+ </div>
+ </subsection>
+ <subsection name="Sample Services">
+ <p>
+ All the source of example services can be found in the samples/axis2Server/src directory.
+ You will find the source code for following services in this directory.
+ </p>
+ <table>
+ <tr>
+ <th>Service</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>SimpleStockQuoteService</td>
+ <td>
+ This service has four operations; getQuote (in-out), getFullQuote(in-out),
+ getMarketActivity(in-out) and placeOrder (in-only). The getQuote operation
+ will generate a sample stock quote for a given symbol. The getFullQuote
+ operation will generate a history of stock quotes for the symbol for a
+ number of days, and the getMarketActivity operation returns stock quotes
+ for a list of given symbols. The placeOrder operation will accept a one
+ way message for an order.
+ </td>
+ </tr>
+ <tr>
+ <td>SecureStockQuoteService</td>
+ <td>
+ This service is a clone of the SimpleStockQuoteService, but has
+ WS-Security enabled and an attached security policy for signing and
+ encryption of messages.
+ </td>
+ </tr>
+ <tr>
+ <td>ReliableStockQuoteService</td>
+ <td>
+ This service is a clone of the SimpleStockQuoteService, but has
+ WS-ReliableMessaging enabled.
+ </td>
+ </tr>
+ <tr>
+ <td>MTOMSwASampleService</td>
+ <td>
+ This service has three operations uploadFileUsingMTOM(in-out),
+ uploadFileUsingSwA(in-out) and oneWayUploadUsingMTOM(in-only) and
+ demonstrates the use of MTOM and SwA. The uploadFileUsingMTOM and
+ uploadFileUsingSwA operations accept a binary image from the SOAP request
+ as MTOM and SwA, and returns this image back again as the response, while
+ the oneWayUploadUsingMTOM saves the request message to disk.
+ </td>
+ </tr>
+ <tr>
+ <td>LoadbalanceFailoverService</td>
+ <td>
+ A simple web service that can be used to test state less as well as
+ session aware load balancing scenarios.
+ </td>
+ </tr>
+ </table>
+ <p>
+ You can compile and deploy any of these services into the provided sample Axis2
+ server by switching to the corresponding directory and invoking 'ant'. For an
+ example to setup the SimpleStockQuoteService, switch to the
+ samples/axis2Server/src/SimpleStockQuoteService directory and run the 'ant'
+ command. You will get an output similar to the following.
+ </p>
+ <div class="consoleOutput">user@host:/tmp/synapse-1.1/samples/axis2Server/src/SimpleStockQuoteService$ ant
+Buildfile: build.xml
+...
+build-service:
+ ....
+ [jar] Building jar: /tmp/synapse-1.1/samples/axis2Server/repository/services/SimpleStockQuoteService.aar
+
+BUILD SUCCESSFUL
+Total time: 3 seconds</div>
+ <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 port 9002 respectively.
+ For some samples it is required to enable additional transport listeners for the
+ sample Axis2 server. The resources listed under '<a href="#Setting_Up_Additional_Resources">Setting Up Additional Features'</a>
+ section provides more information on this.
+ </p>
+ </subsection>
+ <subsection name="Sample Client Applications">
+ <p>
+ The client applications that come with Synapse are able to send SOAP, REST or
+ POX messages over transports like HTTP/S and JMS. They also support WS-Addressing,
+ WS-Security and WS-ReliableMessaging. Some sample clients can be used to send
+ pure binary or plain text messages. They are also capable of sending optimized
+ binary content using MTOM or SwA. Most sample scenarios involve invoking one
+ of these clients to send messages to Synapse. Synapse will then mediate those
+ requests and forward them to the sample services deployed on Axis2.
+ </p>
+ <p>
+ The sample clients can be executed from the samples/axis2Client directory
+ using the provided ant script. Simply executing 'ant' displays the available
+ clients and some of the options used to configure them. The sample clients
+ available are further described in the next section.
+ </p>
+ </subsection>
+ </section>
+ <section name="Sample Axis2 Clients">
+ <subsection name="Stock Quote Client">
+ <p>
+ This is a simple SOAP client that can send stock quote requests, receive
+ generated quotes and display the last sale price for a stock symbol.
+ </p>
+ <div class="command">ant stockquote [-Dsymbol=IBM|MSFT|SUN|..]
+ [-Dmode=quote | customquote | fullquote | placeorder | marketactivity]
+ [-Dsoapver=soap11 | soap12]
+ [-Daddurl=http://localhost:9000/services/SimpleStockQuoteService]
+ [-Dtrpurl=http://localhost:8280] [-Dprxurl=http://localhost:8280]
+ [-Dpolicy=../../repository/conf/sample/resources/policy/policy_1.xml]</div>
+ <p>
+ The client is able to operate in the following modes, and send the payloads
+ listed below as SOAP messages.
+ </p>
+ <table>
+ <tr>
+ <th>Mode</th>
+ <th>Payload</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>quote</td>
+ <td>
+ <div class="xmlConf"><m:getQuote xmlns:m="http://services.samples">
+ <m:request>
+ <m:symbol>IBM</m:symbol>
+ </m:request>
+</m:getQuote></div>
+ </td>
+ <td>
+ Sends a quote request for a single stock symbol. The response
+ contains the last sales price for the stock which will be displayed on
+ console.
+ </td>
+ </tr>
+ <tr>
+ <td>customquote</td>
+ <td>
+ <div class="xmlConf"><m0:checkPriceRequest xmlns:m0="http://www.apache-synapse.org/test">
+ <m0:Code>symbol</m0:Code>
+</m0:checkPriceRequest></div>
+ </td>
+ <td>
+ Sends a quote request in a custom format. Synapse will transform this
+ custom request to the standard stock quote request format and send it to
+ the Axis2 service. Upon receipt of the response, it will be transformed
+ again to a custom response format and returned to the client, which will
+ then display the last sales price.
+ </td>
+ </tr>
+ <tr>
+ <td>fullquote</td>
+ <td>
+ <div class="xmlConf"><m:getFullQuote xmlns:m="http://services.samples">
+ <m:request>
+ <m:symbol>IBM</m:symbol>
+ </m:request>
+</m:getFullQuote></div>
+ </td>
+ <td>
+ Gets quote reports for a stock symbol over a number of days (i.e. last 100
+ days of the year).
+ </td>
+ </tr>
+ <tr>
+ <td>placeorder</td>
+ <td><div class="xmlConf"><m:placeOrder xmlns:m="http://services.samples">
+ <m:order>
+ <m:price>3.141593E0</m:price>
+ <m:quantity>4</m:quantity>
+ <m:symbol>IBM</m:symbol>
+ </m:order>
+</m:placeOrder></div></td>
+ <td>
+ Places an order for stocks using a one way request.
+ </td>
+ </tr>
+ <tr>
+ <td>marketactivity</td>
+ <td><div class="xmlConf"><m:getMarketActivity xmlns:m="http://services.samples">
+ <m:request>
+ <m:symbol>IBM</m:symbol>
+ ...
+ <m:symbol>MSFT</m:symbol>
+ </m:request>
+</m:getMarketActivity></div></td>
+ <td>
+ Gets a market activity report for the day (i.e. quotes for multiple
+ symbols)
+ </td>
+ </tr>
+ </table>
+ <p>
+ To run the stock quote client in a particular mode, pass the name of the mode
+ as a system property as follows.
+ </p>
+ <div class="command">ant stockquote -Dmode=placeorder</div>
+ <p>
+ Behavior of the sample Axis2 client can be further customized by using the 'addurl',
+ 'trpurl' and 'prxurl' parameters. These parameters enable the following modes of
+ operation.
+ </p>
+ <h5>Smart Client Mode</h5>
+ <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 client can operate in the 'smart client' mode, where the addressing EPR can
+ specify the ultimate receiver, while the transport URL set to Synapse will ensure
+ that any necessary mediation takes place before the message is delivered to the
+ ultimate receiver.
+ </p>
+ <div class="command">ant stockquote -Daddurl=<addressingEPR> -Dtrpurl=<synapse></div>
+ <h5>Gateway/Dumb Client Mode</h5>
+ <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 rules configured
+ in Synapse for proper mediation and routing of the message to the ultimate
+ destination.
+ </p>
+ <div class="command">ant stockquote -Dtrpurl=<synapse></div>
+ <h5>Proxy Client Mode</h5>
+ <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 can ensure that the message
+ will reach Synapse for mediation. The client can optionally set a WS-Addressing
+ EPR if required.
+ </p>
+ <div class="command">ant stockquote -Dprxurl=<synapse> [-Daddurl=<addressingEPR>]</div>
+ </subsection>
+ <subsection name="Generic JMS Client">
+ <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. The JMS
+ destination name should be specified with the 'jms_dest' property. The 'jms_type'
+ property can specify 'text', 'binary' or 'pox' to specify the type of message
+ payload.
+ </p>
+ <p>
+ The plain text payload for a 'text' message can be specified through the 'payload'
+ property. For binary messages, the 'payload' property will contain the path to
+ the binary file. For POX messages, the 'payload' property will hold a stock
+ symbol name to be used within the POX request for stock order placement requests.
+ </p>
+ <div class="command">ant jmsclient -Djms_type=text -Djms_dest=dynamicQueues/JMSTextProxy -Djms_payload="24.34 100 IBM"
+ant jmsclient -Djms_type=pox -Djms_dest=dynamicQueues/JMSPoxProxy -Djms_payload=MSFT
+ant jmsclient -Djms_type=binary -Djms_dest=dynamicQueues/JMSFileUploadProxy
+ -Djms_payload=./../../repository/conf/sample/resources/mtom/asf-logo.gif</div>
+ <p>
+ The JMS client assumes the existence of a default ActiveMQ (v4.1.0 or above)
+ installation on the local machine. Refer JMS setup guide for more details.
+ </p>
+ </subsection>
+ <subsection name="MTOM/SwA Client">
+ <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 save
+ it as a temporary file. The 'opt_mode' can specify 'mtom' or 'swa' respectively
+ for the above mentioned optimizations. Optionally the path to a custom file can
+ be specified through the 'opt_file' property, and the destination address can be
+ changed through the 'opt_url' property if required.
+ </p>
+ <div class="command">ant optimizeclient -Dopt_mode=[mtom | swa]</div>
+ </subsection>
+ </section>
+ <section name="Setting Up Additional Features">
+ <ul>
+ <li><a href="jms.html">JMS Setup Guide</a></li>
+ <li><a href="fix.html">FIX Setup Guide</a></li>
+ <li><a href="tcp_udp.html">TCP/UDP Setup Guide</a></li>
+ <li><a href="db.html">Database Setup Guide</a></li>
+ <li><a href="script.html">Script Setup Guide</a></li>
+ <li><a href="mail.html">E-Mail Setup Guide</a></li>
+ </ul>
+ </section>
+ </body>
+</document>
Added: synapse/branches/2.1/modules/documentation/src/site/xdoc/userguide/samples/setup/jms.xml
URL: http://svn.apache.org/viewvc/synapse/branches/2.1/modules/documentation/src/site/xdoc/userguide/samples/setup/jms.xml?rev=1222651&view=auto
==============================================================================
--- synapse/branches/2.1/modules/documentation/src/site/xdoc/userguide/samples/setup/jms.xml (added)
+++ synapse/branches/2.1/modules/documentation/src/site/xdoc/userguide/samples/setup/jms.xml Fri Dec 23 11:55:05 2011
@@ -0,0 +1,198 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+ ~ 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.
+ -->
+
+<document>
+ <properties>
+ <title>Apache Synapse - JMS Setup Guide</title>
+ </properties>
+ <body>
+ <section name="JMS Setup Guide">
+ <p>
+ This document explains how to setup the JMS transport sender and listener
+ as required by the samples. An Apache ActiveMQ instance is used as the JMS
+ provider for the samples.
+ </p>
+ </section>
+ <section name="Contents">
+ <ul>
+ <li><a href="#intro">Introduction</a></li>
+ <li><a href="#pre">Prerequisites</a></li>
+ <li>
+ <a href="#synapse">Enabling JMS Support in Synapse</a>
+ <ul>
+ <li><a href="#listener">Enabling the JMS Listener</a></li>
+ <li><a href="#sender">Enabling the JMS Sender</a></li>
+ </ul>
+ </li>
+ <li><a href="#server">Enabling JMS Support in Axis2 Server</a></li>
+ <li><a href="#client">Enabling JMS Support in Axis2 Client</a></li>
+ <li><a href="#amqp">Configure Synapse for AMQP Transport</a></li>
+ </ul>
+ </section>
+ <section name="Introduction" id="intro">
+ <p>
+ Apache Synapse has exceptional support for JMS (Java Message Service). It uses JNDI
+ to connect to JMS brokers, and therefore works with any JMS provider that supports
+ JNDI. Synapse has been successfully tested with the following well-known JMS
+ providers.
+ </p>
+ <ul>
+ <li>Apache ActiveMQ</li>
+ <li>Apache Qpid (AMQP)</li>
+ <li>IBM WebsphereMQ</li>
+ <li>SwiftMQ</li>
+ <li>WebLogic</li>
+ </ul>
+ <p>
+ All the JMS related samples that come with Synapse assumes <a href="http://activemq.apache.org">ActiveMQ</a>
+ to be the JMS broker. But they can be executed with any other JMS provider by making
+ a few simple changes to the JMS transport configuration in Synapse.
+ </p>
+ <p>
+ This article explains how to enable and setup the JMS transport for Synapse, the sample
+ Axis2 server and the sample client programs. Since the samples are mainly focusing
+ on ActiveMQ, much of this discussion will also be biased towards Apache ActiveMQ.
+ </p>
+ </section>
+ <section name="Prerequisites" id="pre">
+ <p>
+ First we need to install and start a JMS broker. The actual installation procedure
+ of the JMS broker may vary depending on the broker application. If ActiveMQ is used
+ as the JMS broker, you can install and run the broker by following 3 simple steps
+ given below.
+ </p>
+ <ol>
+ <li><a href="http://activemq.apache.org/download.html">Download</a> the latest Apache ActiveMQ binary distribution</li>
+ <li>Extract the downloaded archive to a suitable location on the local disk</li>
+ <li>Switch to the 'bin' directory of the installation and execute the startup script</li>
+ </ol>
+ <p>
+ Next we need to deploy the JMS client libraries into Synapse. Client libraries are
+ also specific to the JMS broker being used. These jar files are usually available in
+ the binary distribution of the JMS broker. Third party libraries such as JMS client
+ libraries are deployed into Synapse by simply copying them into the 'lib' directory
+ of Synapse. Therefore if we are to use ActiveMQ as the JMS broker, the following jar
+ files which can be found in the 'lib' directory of ActiveMQ installation, should be
+ copied into the 'lib' directory of Synapse.
+ </p>
+ <ul>
+ <li>activemq-core.jar</li>
+ <li>geronimo-jms.jar</li>
+ <li>geronimo-j2ee-management.jar</li>
+ </ul>
+ <p>
+ Now we are all set to enable the JMS transport receiver and sender for Synapse and
+ other sample applications.
+ </p>
+ </section>
+ <section name="Enabling JMS Support in Synapse" id="synapse">
+ <p>
+ The JMS transport of Synapse consists of two main components.
+ </p>
+ <ul>
+ <li>JMS transport receiver (JMS listener)</li>
+ <li>JMS transport sender (JMS sender)</li>
+ </ul>
+ <subsection name="Enabling the JMS Listener" id="listener">
+ <p>
+ If we want Synapse to receive messages from a JMS destination, then we should enable
+ the JMS transport receiver of Synapse. This can be done by editing the axis2.xml file
+ in the repository/conf directory and uncommenting the following XML fragment which
+ defines the JMS transport receiver configuration.
+ </p>
+ <div class="xmlConf"><!--Uncomment this and configure as appropriate for JMS transport support, after setting up your JMS environment (e.g. ActiveMQ)-->
+<transportReceiver name="jms" class="org.apache.synapse.transport.jms.JMSListener">
+ <parameter name="myTopicConnectionFactory" locked="false">
+ <parameter name="java.naming.factory.initial" locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+ <parameter name="java.naming.provider.url" locked="false">tcp://localhost:61616</parameter>
+ <parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">TopicConnectionFactory</parameter>
+ </parameter>
+
+ <parameter name="myQueueConnectionFactory" locked="false">
+ <parameter name="java.naming.factory.initial" locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+ <parameter name="java.naming.provider.url" locked="false">tcp://localhost:61616</parameter>
+ <parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
+ </parameter>
+
+ <parameter name="default" locked="false">
+ <parameter name="java.naming.factory.initial" locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+ <parameter name="java.naming.provider.url" locked="false">tcp://localhost:61616</parameter>
+ <parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
+ </parameter>
+</transportReceiver></div>
+ <p>
+ Please note that above configuration is for the AcitveMQ broker. If you are using some
+ other JMS provider, then the values of the parameters should be changed accordingly.
+ </p>
+ </subsection>
+ <subsection name="Enabling the JMS Sender" id="sender">
+ <p>
+ If you want to configure Synapse to send out JMS messages, then the JMS transport
+ sender must be enabled. This is done by uncommenting the following section in the
+ repository/conf/axis2.xml file.
+ </p>
+ <div class="xmlConf"><transportSender name="jms" class="org.apache.axis2.transport.jms.JMSSender"></div>
+ <p>
+ Generally JMS transport sender is enabled by default in Synapse.
+ </p>
+ <p>
+ Synapse also comes with a simple Ant script that can be used to easily setup
+ and enable the JMS transport in Synapse. To try this out go to the samples/util
+ directory and execute the following command.
+ </p>
+ <div class="command">ant setupActiveMQ -Dactivemq.home=<i><ActiveMQ home directory></i></div>
+ <p>
+ This will copy the necessary dependencies into Synapse and update the axis2.xml
+ file accordingly. Instead of providing the ActiveMQ installation path as a system
+ property, you can opt to set the ACTIVEMQ_HOME environment variable too.
+ </p>
+ </subsection>
+ </section>
+ <section name="Enabling JMS Support in Axis2 Server" id="server">
+ <p>
+ Some of the Synapse samples involve Synapse sending messages to the Axis2 server
+ over JMS. For that we should enable the JMS transport listener and the sender for
+ the Axis2 server (sender is used to send back responses). Provided that all the
+ prerequisites are met, this can be done by uncommenting the JMS transport receiver
+ and sender configurations in the samples/axis2Server/repository/conf/axis2.xml file.
+ You will find that JMS sender is enabled for the Axis2 server by default.
+ </p>
+ <p>
+ You can also execute the following command from the samples/util directory to
+ enable the JMS transport for Axis2 in an automated fashion.
+ </p>
+ <div class="command">ant setupActiveMQ -Daxis2.xml=../axis2Server/repository/conf/axis2.xml</div>
+ <p>
+ As in the case of Synapse, the default JMS listener configurations given in the
+ above axis2.xml file are for ActiveMQ. For other brokers, configuration should be
+ updated accordingly.
+ </p>
+ </section>
+ <section name="Enabling JMS Support in Axis2 Client" id="client">
+ <p>
+ In some sample scenarios we have to send JMS requests using the Axis2 client.
+ In such cases we should enable the JMS transport sender for the sample client. This
+ can be done by uncommenting the JMS sender configuration in the
+ samples/axis2Client/client_repo/conf/axis2.xml file. Generally this is enabled by
+ default and so you only need to meet the prerequisites described above.
+ </p>
+ </section>
+ </body>
+</document>
\ No newline at end of file
Added: synapse/branches/2.1/modules/documentation/src/site/xdoc/userguide/samples/setup/mail.xml
URL: http://svn.apache.org/viewvc/synapse/branches/2.1/modules/documentation/src/site/xdoc/userguide/samples/setup/mail.xml?rev=1222651&view=auto
==============================================================================
--- synapse/branches/2.1/modules/documentation/src/site/xdoc/userguide/samples/setup/mail.xml (added)
+++ synapse/branches/2.1/modules/documentation/src/site/xdoc/userguide/samples/setup/mail.xml Fri Dec 23 11:55:05 2011
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- ~ 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. -->
+
+<document>
+ <properties>
+ <title>Apache Synapse - E-Mail Setup Guide</title>
+ </properties>
+ <body>
+ <section name="E-Mail Setup Guide">
+ <p>
+ This document explains how to setup the mail transport sender and listener
+ as required by the samples.
+ </p>
+ </section>
+ <section name="Contents">
+ <ul>
+ <li>
+ <a href="#mailTransportSender">Setting up Mail Transport Sender</a>
+ </li>
+ <li>
+ <a href="#mailTransportReceiver">Setting up Mail Transport Receiver</a>
+ </li>
+ </ul>
+ </section>
+ <section name="Setting up Mail Transport Sender"
+ id="mailTransportSender">
+ <p>
+ To enable the mail transport sender for samples, you need to uncomment
+ the mail transport sender configuration in the
+ repository/conf/axis2.xml. Uncomment the mail transport sender sample
+ configuration and make sure it points to a valid SMTP configuration for
+ any actual scenarios.
+ <div class="xmlConf"><transportSender name="mailto" class="org.apache.synapse.transport.mail.MailTransportSender">
+ <parameter name="mail.smtp.host">smtp.gmail.com</parameter>
+ <parameter name="mail.smtp.port">587</parameter>
+ <parameter name="mail.smtp.starttls.enable">true</parameter>
+ <parameter name="mail.smtp.auth">true</parameter>
+ <parameter name="mail.smtp.user">synapse.demo.0</parameter>
+ <parameter name="mail.smtp.password">mailpassword</parameter>
+ <parameter name="mail.smtp.from">synapse.demo.0@gmail.com</parameter>
+</transportSender></div>
+ </p>
+ </section>
+ <section name="Setting up Mail Transport Receiver"
+ id="mailTransportReceiver">
+ <p>
+ To enable the mail transport receiver for samples, you need to
+ uncomment the mail transport receiver configuration in the
+ configuration. Note: you need to provide correct parameters for a valid
+ mail account at service level.
+ </p>
+ <div class="xmlConf"><transportReceiver name="mailto" class="org.apache.axis2.transport.mail.MailTransportListener"></transportReceiver></div>
+ </section>
+ </body>
+</document>
\ No newline at end of file
Added: synapse/branches/2.1/modules/documentation/src/site/xdoc/userguide/samples/setup/script.xml
URL: http://svn.apache.org/viewvc/synapse/branches/2.1/modules/documentation/src/site/xdoc/userguide/samples/setup/script.xml?rev=1222651&view=auto
==============================================================================
--- synapse/branches/2.1/modules/documentation/src/site/xdoc/userguide/samples/setup/script.xml (added)
+++ synapse/branches/2.1/modules/documentation/src/site/xdoc/userguide/samples/setup/script.xml Fri Dec 23 11:55:05 2011
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- ~ 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. -->
+
+<document>
+ <properties>
+ <title>Apache Synapse - Script Setup Guide</title>
+ </properties>
+ <body>
+ <section name="Script Setup Guide">
+ <p>
+ Apache Synapse ships with a set of scripting samples. This document explains
+ how to setup the necessary script engines for these samples. In addition this
+ guide describes how to setup the JSON message builder and formatter for JSON
+ mediation samples.
+ </p>
+ </section>
+ <section name="Contents">
+ <ul>
+ <li>
+ <a href="#intro">Introduction</a>
+ </li>
+ <li>
+ <a href="#javaScript">JavaScripts Support</a>
+ </li>
+ <li>
+ <a href="#ruby">Ruby Support</a>
+ </li>
+ <li>
+ <a href="#json">JSON Support</a>
+ </li>
+ </ul>
+ </section>
+ <section name="Configuring Synapse for Script Mediator Support"
+ id="intro">
+ <p>
+ The Synapse Script Mediator is a Synapse extension, and thus all
+ prerequisites 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 explained in the following
+ sections.
+ </p>
+ <subsection name="JavaScript Support" id="javaScript">
+
+ <p>
+ The JavaScript/E4X support is enabled by default and comes
+ ready-to-use with the Synapse distribution.
+ </p>
+ </subsection>
+ <subsection name="Ruby Support" id="ruby">
+ <p>
+ For Ruby support you need to download the 'jruby-complete.jar'
+ from the Maven repository for JRuby, and copy it into the 'lib'
+ folder of Synapse . The JRuby JAR can be downloaded from
+ <a class="externalLink"
+ href="http://repo2.maven.org/maven2/org/jruby/jruby-complete/1.3.0/jruby-complete-1.3.0.jar">
+ here
+ </a>
+ </p>
+ </subsection>
+ <subsection name="JSON Support" id="json">
+ <p>
+ <a class="externalLink" href="http://json.org">JSON</a>
+ is a lightweight data-interchange format.
+ It can be used as an alternative to XML or SOAP. To enable the JSON
+ support in Synapse, following two jar files should be deployed into the 'lib'
+ directory of Synapse.
+ </p>
+ <ul>
+ <li>
+ <a class="externalLink" href="http://repo1.maven.org/maven2/org/apache/axis2/axis2-json">axis2-json.jar</a>
+ </li>
+ <li>
+ <a class="externalLink" href="http://jettison.codehaus.org/Download">jettison.jar</a>
+ </li>
+ </ul>
+ <p>
+ Jettison 1.1 is recommended.
+ </p>
+ <p>
+ Having deployed the necessary libraries you should now register the JSON message
+ builder and formatter with Synapse. Open up 'repository/conf/axis2.xml' file
+ of Synapse and add the following two entries under the 'messageBuilders' and
+ 'messageFormatters' sections respectively.
+ </p>
+ <div class="xmlConf"><messageBuilder contentType="application/json"
+ class="org.apache.axis2.json.JSONOMBuilder"/>
+
+<messageFormatter contentType="application/json"
+ class="org.apache.axis2.json.JSONMessageFormatter"/></div>
+ <p>
+ If you are planning to run sample 440, you should also add the above two entries
+ to the 'samples/axis2Client/client_repo/conf/axis2.xml' file.
+ </p>
+ </subsection>
+
+ </section>
+ </body>
+</document>
\ No newline at end of file
Added: synapse/branches/2.1/modules/documentation/src/site/xdoc/userguide/samples/setup/tcp_udp.xml
URL: http://svn.apache.org/viewvc/synapse/branches/2.1/modules/documentation/src/site/xdoc/userguide/samples/setup/tcp_udp.xml?rev=1222651&view=auto
==============================================================================
--- synapse/branches/2.1/modules/documentation/src/site/xdoc/userguide/samples/setup/tcp_udp.xml (added)
+++ synapse/branches/2.1/modules/documentation/src/site/xdoc/userguide/samples/setup/tcp_udp.xml Fri Dec 23 11:55:05 2011
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+ ~ 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.
+ -->
+
+<document>
+ <properties>
+ <title>Apache Synapse - TCP/UDP Setup Guide</title>
+ </properties>
+ <body>
+ <section name="TCP/UDP Setup Guide">
+ <p>
+ This document explains how to setup the transport sender and listener
+ for TCP/UDP transports required by the samples.
+ </p>
+ </section>
+ <section name="Contents">
+ <ul>
+ <li><a href="#intro">Introduction</a></li>
+ <li><a href="#tcp">Setting Up the TCP Transport</a></li>
+ <li><a href="#udp">Setting Up the UDP Transport</a></li>
+ </ul>
+ </section>
+ <section name="Introduction" id="intro">
+ <p>
+ Apache Synapse is capable of sending and receiving messages over raw TCP and UDP.
+ Any messages received over these transports can be mediated using the usual set of
+ mediators and can be forwarded over different protocols such as HTTP ans JMS. The
+ transport adapters for TCP and UDP are not available in the Synapse binary
+ distribution by default. This guide will help you to download and setup them in
+ Synapse ESB.
+ </p>
+ </section>
+ <section name="Setting Up the TCP Transport" id="tcp">
+ <p>
+ To enable the TCP transport for Synapse, first you need to download the Axis2 TCP
+ transport jar, and copy it to the 'lib' directory of Synapse. This library can be
+ downloaded from the <a href="http://ws.apache.org/commons/transport">WS-Commons Transports</a>
+ website. Then open up the axis2.xml file and uncomment the TCP transport receiver
+ and sender configurations.
+ </p>
+ <div class="xmlConf"><transportReceiver name="tcp" class="org.apache.axis2.transport.tcp.TCPServer">
+ <parameter name="port">6060</parameter>
+</transportReceiver></div>
+ <div class="xmlConf"><transportSender name="tcp" class="org.apache.axis2.transport.tcp.TCPTransportSender"/></div>
+ <p>
+ The above configuration enables Synapse to receive raw TCP messages on port 6060.
+ Since no application level headers are available on such requests, Synapse will be
+ solely depending on the addressing headers or the XML payload of the messages to
+ find the target service for TCP requests.
+ </p>
+ <p>
+ In some of the samples you will have to send raw TCP messages using the sample
+ Axis2 client. In that case you should enable the TCP transport sender for the
+ sample client. This can be done by uncommenting the following entry in the
+ samples/axis2Client/client_repo/conf/axis2.xml file.
+ </p>
+ <div class="xmlConf"><transportSender name="tcp" class="org.apache.axis2.transport.tcp.TCPTransportSender"/></div>
+ </section>
+ <section name="Setting Up the UDP Transport" id="udp">
+ <p>
+ Enabling the UDP transport for Synapse is similar to enabling the TCP transport. You
+ should <a href="http://ws.apache.org/commons/transport">download</a> the Axis2 UDP
+ transport jar and copy it into 'lib' directory of Synapse. Then uncomment the
+ following entries in the repository/conf/axis2.xml file to enable the UDP listener
+ and sender.
+ </p>
+ <div class="xmlConf"><transportReceiver name="udp" class="org.apache.axis2.transport.udp.UDPListener"/></div>
+ <div class="xmlConf"><transportSender name="udp" class="org.apache.axis2.transport.udp.UDPSender"/></div>
+ <p>
+ To send UDP messages from the sample client, enable the UDP transport sender for the
+ client in samples/axis2Client/client_repo/conf/axis2.xml file.
+ </p>
+ </section>
+ </body>
+</document>
\ No newline at end of file
Added: synapse/branches/2.1/modules/documentation/src/site/xdoc/userguide/samples/template.xml
URL: http://svn.apache.org/viewvc/synapse/branches/2.1/modules/documentation/src/site/xdoc/userguide/samples/template.xml?rev=1222651&view=auto
==============================================================================
--- synapse/branches/2.1/modules/documentation/src/site/xdoc/userguide/samples/template.xml (added)
+++ synapse/branches/2.1/modules/documentation/src/site/xdoc/userguide/samples/template.xml Fri Dec 23 11:55:05 2011
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+ ~ 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.
+ -->
+
+<document>
+ <properties>
+ <title>Apache Synapse - Sample X</title>
+ </properties>
+ <body>
+ <section name="Sample X: ">
+ <div class="xmlConf">
+
+ </div>
+ <subsection name="Objective">
+ <p>
+
+ </p>
+ </subsection>
+ <subsection name="Pre-requisites">
+ <p>
+ <ul>
+ <li>
+ Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+ </li>
+ <li>
+ Start Synapse using the configuration numbered X (repository/conf/sample/synapse_sample_X.xml)
+ <div class="command">
+ Unix/Linux: sh synapse.sh -sample X<br/>
+ Windows: synapse.bat -sample X
+ </div>
+ </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>
+ </subsection>
+ </section>
+ <p><a href="../samples.html">Back to Catalog</a></p>
+ </body>
+</document>
\ No newline at end of file