Author: chamikara
Date: Sun Dec 4 22:18:55 2005
New Revision: 353996
URL: http://svn.apache.org/viewcvs?rev=353996&view=rev
Log:
Updated maven files
Added a samples guide
Added:
webservices/sandesha/trunk/xdocs/samplesGuide.html
Modified:
webservices/sandesha/trunk/maven.xml
webservices/sandesha/trunk/xdocs/navigation.xml
webservices/sandesha/trunk/xdocs/userGuide.html
Modified: webservices/sandesha/trunk/maven.xml
URL:
http://svn.apache.org/viewcvs/webservices/sandesha/trunk/maven.xml?rev=353996&r1=353995&r2=353996&view=diff
==============================================================================
--- webservices/sandesha/trunk/maven.xml (original)
+++ webservices/sandesha/trunk/maven.xml Sun Dec 4 22:18:55 2005
@@ -15,6 +15,7 @@
<ant:property name="dir.samples" value="samples"/>
<ant:property name="dir.config" value="config"/>
<ant:property name="apache.license.file" value="LICENSE.txt" />
+ <ant:property name="readme.file" value="README.txt" />
<ant:property name="release.notes.file" value="release-notes.html" />
<goal name="all"
prereqs="jar,mar:create,sample:create,client:create,server:create" />
@@ -103,6 +104,13 @@
<ant:jar
jarfile="${build.samples.services.dir}/${interop.service.aar.name}"
basedir="${dir.sample.interop.temp}" />
<ant:jar
jarfile="${build.samples.clients.dir}/${interop.client.jar.name}"
basedir="${dir.sample.interopclients.temp}" />
+ <ant:copy todir="${build.samples.clients.dir}" >
+ <ant:fileset dir="${dir.samples}/conf/interop">
+ <ant:include name="*.bat" />
+ <ant:include name="*.sh" />
+ </ant:fileset>
+ </ant:copy>
+
<!-- <delete dir="${build.temp.dir}" /> -->
</goal>
@@ -148,9 +156,20 @@
<ant:mkdir dir="${dir.temp.dist.bin}/docs"/>
<ant:mkdir dir="${dir.temp.dist.bin}/samples"/>
<ant:mkdir dir="${dir.temp.dist.bin}/samples/clients"/>
+ <ant:mkdir dir="${dir.temp.dist.bin}/samples/clients/services"/>
+ <ant:mkdir dir="${dir.temp.dist.bin}/samples/clients/modules"/>
+ <ant:mkdir dir="${dir.temp.dist.bin}/samples/clients/lib"/>
<ant:mkdir dir="${dir.temp.dist.bin}/samples/services"/>
<ant:mkdir dir="${dir.temp.dist.bin}/docs/api"/>
+ <ant:copy file="${dir.config}/axis2.xml"
todir="${dir.temp.dist.bin}/samples/clients" />
+
+ <ant:copy todir="${dir.temp.dist.bin}/docs/api">
+ <ant:fileset dir="target/docs/apidocs/">
+ <ant:include name="**"/>
+ </ant:fileset>
+ </ant:copy>
+
<ant:copy todir="${dir.temp.dist.bin}/docs/api">
<ant:fileset dir="target/docs/apidocs/">
<ant:include name="**"/>
@@ -174,11 +193,15 @@
<ant:copy file="${dir.config}/sandesha2.properties"
todir="${dir.temp.dist.bin}" />
<ant:copy file="${apache.license.file}" todir="${dir.temp.dist.bin}" />
<ant:copy file="${release.notes.file}" todir="${dir.temp.dist.bin}" />
+ <ant:copy file="${readme.file}" todir="${dir.temp.dist.bin}" />
<ant:copy todir="${dir.temp.dist.bin}/samples">
<ant:fileset dir="${build.samples.dir}">
<ant:include name="classes/**/*.class" />
<ant:include name="clients/*.jar" />
+ <ant:include name="clients/*.bat"/>
+ <ant:include name="clients/*.sh"/>
+ <ant:include name="clients/*.xml"/>
</ant:fileset>
</ant:copy>
Modified: webservices/sandesha/trunk/xdocs/navigation.xml
URL:
http://svn.apache.org/viewcvs/webservices/sandesha/trunk/xdocs/navigation.xml?rev=353996&r1=353995&r2=353996&view=diff
==============================================================================
--- webservices/sandesha/trunk/xdocs/navigation.xml (original)
+++ webservices/sandesha/trunk/xdocs/navigation.xml Sun Dec 4 22:18:55 2005
@@ -10,6 +10,7 @@
<item name="Documentation">
<item name="User Guide" href="userGuide.html"/>
<item name="Architecture Guide"
href="architectureGuide.html"/>
+ <item name="Samples Guide" href="samplesGuide.html"/>
<item name="Java Docs" href="apidocs/index.html" />
</item>
<item name="Project Information">
Added: webservices/sandesha/trunk/xdocs/samplesGuide.html
URL:
http://svn.apache.org/viewcvs/webservices/sandesha/trunk/xdocs/samplesGuide.html?rev=353996&view=auto
==============================================================================
--- webservices/sandesha/trunk/xdocs/samplesGuide.html (added)
+++ webservices/sandesha/trunk/xdocs/samplesGuide.html Sun Dec 4 22:18:55 2005
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
+ <title>Sandesha2 Samples Guide</title>
+ <meta name="generator" content="amaya 9.2.2, see http://www.w3.org/Amaya/"
+ />
+</head>
+
+<body>
+<h1>Sandesha2 Samples Guide</h1>
+
+<p>This document explains how to run the samples that come with the current
+Sandesha2 distribution.</p>
+
+<p>Please go through following steps to setup and run the samples.</p>
+
+<h2>Setting up the server</h2>
+
+<p>Install tomcat and add the Axis2 web app.</p>
+
+<p>Add an user phase named RMPhase to both inFlow and outFlow of
+axis2.xml.</p>
+
+<p>Add the Sandesha2 module (Sandesha2-0.9.mar) to the
+<AXIS2_WEBAPP>\WEB-INF\modules directory.</p>
+
+<p>Start tomcat.</p>
+
+<h2>Setting up the client</h2>
+
+<p>We have made a client repo available at the directory samples\clients
+directory of the Sandesha2 binary distribution.</p>
+
+<p>Add all the jar files that come with the lib directory of Apache Axis2
+binary distrubution to the samples\clients\lib directory.</p>
+
+<p>Add the addressing.mar module file that comes with Apache Axis2 to the
+samples\clients\modules directory.</p>
+
+<p>Add the Sandesha2-0.9.mar file that comes with Apache Sandesha2 binary
+distribution to samples\clients\modules directory.</p>
+
+<h2>Setting up the tcp monitor.</h2>
+
+<p>start the tcp monitor utility program and map following ports.</p>
+
+<p>8070 -> 8080 (assuming that you started tomcat in the port 8080)</p>
+
+<p>9070 -> 6060 (Assuming that the clients listner port of Axis2 is
+6060)</p>
+
+<p></p>
+
+<p></p>
+
+<h2>Running the sample clients</h2>
+
+<p>Simply double click the the bat files that come in the samples\client
+directory of the Sandesha2 binary distribution to run various samples clients
+and observer tcp monitor to see the message exchange.</p>
+</body>
+</html>
Modified: webservices/sandesha/trunk/xdocs/userGuide.html
URL:
http://svn.apache.org/viewcvs/webservices/sandesha/trunk/xdocs/userGuide.html?rev=353996&r1=353995&r2=353996&view=diff
==============================================================================
--- webservices/sandesha/trunk/xdocs/userGuide.html (original)
+++ webservices/sandesha/trunk/xdocs/userGuide.html Sun Dec 4 22:18:55 2005
@@ -1,182 +1,182 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
- <title>Sandesha2 User Guide</title>
- <meta name="generator" content="amaya 9.2.2, see http://www.w3.org/Amaya/"
- />
-</head>
-
-<body>
-<h1>Sandesha2 User Guide</h1>
-
-<p>This document introduces you to Apache Sandesha2. Sandesha2 is the
-WS-ReliableMessaging implementation for Axis2. With Sandesha2 you can host
-some reliable web services or interact with reliable web services hosted by
-others.</p>
-
-<p></p>
-
-<h2>Using Sandesha2 in the server side</h2>
-
-<p>First lets look at how to use Sandesha2 in the server side.</p>
-
-<p>You can set up Sandesha2 for the server side with following steps.</p>
-<ol>
- <li>Download and deploy axis2(please see Axis2 user guide for more
- details).</li>
- <li>Add a user phase called RMPhase to all four flows of axis2.xml.</li>
- <li>Download latest Sandesha2 distribution and add Sandesha2 mar file to
- <AXIS2_WEBAPP>\WEB_INF\modules directory.</li>
- <li>Add sandesha2.properties file to the
- <AXIS2_WEBAPP>\WEB_INF\classes directory.</li>
-</ol>
-
-<p>Now your Sandesha2 module is setup and deployed.</p>
-
-<p></p>
-
-<p>To host reliable web service you have to create a service archive (aar)
-file with the given details (please see Axis2 user guide for more details on
-creating aar files).</p>
-
-<p>Add a module reference for Sandesha2 to the services.xml (within the aar
-file) as given below.</p>
-<pre><service name="TestService">
-<module ref="Sandesha2-0.9"/>
-.......................
-<!-- Your operation definitions and other stuff
-........................
-</service></pre>
-
-<p>Create the service archieve file.</p>
-
-<p>Deploy it by dropping it to <AXIS2_WEBAPP>/WEB-INF/services
-directory.</p>
-
-<p>Now your service is deployed with reliable messaging support.</p>
-
-<p></p>
-
-<h2>Using Sandesha2 in the client side</h2>
-
-<p>Add Sandesha2 module in the way you normally add a module to the Axis2
-client side (see Axis2 user guide for more details). Following scenarios will
-explain you how to write the client code.</p>
-
-<p></p>
-
-<h3>Basic scenarios</h3>
-
-<p><b>Sample RM enabled client code for a one way service call.</b></p>
-<pre>MessageSender sender = new MessageSender (AXIS2_CLIENT_REPO_PATH);
-<span style="background-color: #CCCCCC">sender.engageModule(new QName
("Sandesha2-0.9"));</span>
-Options clientOptions = new Options ();
-sender.setClientOptions(clientOptions);
-<span style="background-color:
#CCCCCC">clientOptions.setProperty(Options.COPY_PROPERTIES,new Boolean
(true));</span>
-clientOptions.setTo(new EndpointReference(toEPR));
-sender.send("ping",getPingOMBlock("ping1"));
-sender.send("ping",getPingOMBlock("ping2"));
-<span style="background-color:
#CCCCCC">clientOptions.setProperty(Sandesha2ClientAPI.LAST_MESSAGE,
"true");</span>
-sender.send("ping",getPingOMBlock("ping3"));</pre>
-
-<p>There are only three difference here from your normal client code.</p>
-
-<p>First you have to engage the sandesha module as given in the line 2.</p>
-
-<p>Make sure you set the copy properties property of the options object to
-true as given in line 5.</p>
-
-<p>Before the last message you must set the last message property, which is
-given in the line 9.</p>
-
-<p></p>
-
-<p><b>Simple RM enabled client code for a request reply service call.</b></p>
-
-<p>First thing to remember is that you are not able to get synchronous
-(single channel) responses with Sandesha2. Because of this if you expect
-response message, you must have a return endpoint accessible from the server
-side. But making two channel blocking invocations is perfectly valid. But
-please make sure tht you have set a suitable time out interval within your
-call object.</p>
-
-<p></p>
-
-<p>Here is a code sample for this scenario.</p>
-<pre>Call call = new Call(AXIS2_CLIENT_REPO_PATH);
-<span style="background-color: #CCCCCC">call.engageModule(new
QName("Sandesha2-0.9"));</span>
-Options clientOptions = new Options ();
-<span style="background-color:
#CCCCCC">clientOptions.setProperty(Options.COPY_PROPERTIES,new Boolean
(true));</span>
-call.setClientOptions(clientOptions);
-//Make sure set the following two properties in the request-reply case.
-<span style="background-color:
#CCCCCC">clientOptions.setListenerTransportProtocol(Constants.TRANSPORT_HTTP);</span>
-<span style="background-color:
#CCCCCC">clientOptions.setUseSeparateListener(true);</span>
-clientOptions.setTo(ne EndpointReference(toEPR));
-Callback callback1 = new TestCallback ("Callbck 1");
-call.invokeNonBlocking("echoString", getEchoOMBlock("echo1"),callback1);
-<span style="background-color:
#CCCCCC">clientOptions.setProperty(Sandesha2ClientAPI.LAST_MESSAGE,
"true");</span>
-Callback callback3 = new TestCallback ("Callback 3");
-call.invokeNonBlocking("echoString", getEchoOMBlock("echo3"),callback3);</pre>
-
-<p></p>
-
-<p>Here also let me explaing the differences from a normal request-reply
-client code.</p>
-
-<p>As in the request only case that was explained before, you have to engage
-the Sandesha2 module.</p>
-
-<p>You have to tell axis enging to use a seperate channel for the responses
-as given in the line 8. Also make sure that you set the listner transport as
-given in line 7.</p>
-
-<p>Also you have to set the last message property.</p>
-
-<p></p>
-
-<h3>Advance scenarios</h3>
-
-<p><b>Getting acknowledgements and faults to a given endpoint.</b></p>
-
-<p>In the dafault configuration response path for acknowledgements and faults
-related to a sequene is the anonymous endpoint. Because of this for example
-HTTP transport will send acknowledgements and faults in the HTTP response. If
-you want to avoid this and if you want to get acknowledgements and faults to
-a different endpoing add following part to the client code before doing any
-incovation.</p>
-<pre>sender.set(Sandesha2ClientAPI.AcksTo,<endpoint>); //example
endpoint - http://tempuri.org/acks.</pre>
-
-<p></p>
-
-<p><b>Managing sequences.</b></p>
-
-<p>I the default behaviour Sandesha 2 assumes that messages going to the same
-endpoing should go in the same RM sequence. If you invoke two endpoints they
-will go in two sequences. If you want you can tell sandesha2 to start two
-sequences for the same endpoint as well. To do this you have to set a
-property called Sequence Key.</p>
-<pre>call.set(Sandesha2ClientAPI.SEQUENCE_KEY,<a string to identify the
sequence>);</pre>
-
-<p>If the sequence key is different Sandesha2 will send messages in two
-sequences even if they are sent to the same endpoint.</p>
-
-<p></p>
-
-<p><b>Offering a sequence ID for the response sequence.</b></p>
-
-<p>This is a concept of reliable messaging which may not be very useful to
-you as a user. Here what you do is offering a sequene ID for the sequence to
-be created in the response side withing the first Create Sequence Request
-message itself. with this you can avoid sending of a extra Create Sequence
-message from the server to the client. To do this add following to the client
-code.</p>
-<pre>call.set(Sandesha2ClientAPI.OFFERED_SEQUENCE_ID,<new uuid>);</pre>
-
-<p></p>
-
-<p></p>
-</body>
-</html>
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
+ <title>Sandesha2 User Guide</title>
+ <meta name="generator" content="amaya 9.2.2, see http://www.w3.org/Amaya/"
+ />
+</head>
+
+<body>
+<h1>Sandesha2 User Guide</h1>
+
+<p>This document introduces you to Apache Sandesha2. Sandesha2 is the
+WS-ReliableMessaging implementation for Axis2. With Sandesha2 you can host
+some reliable web services or interact with reliable web services hosted by
+others.</p>
+
+<p></p>
+
+<h2>Using Sandesha2 in the server side</h2>
+
+<p>First lets look at how to use Sandesha2 in the server side.</p>
+
+<p>You can set up Sandesha2 for the server side with following steps.</p>
+<ol>
+ <li>Download and deploy axis2(please see Axis2 user guide for more
+ details).</li>
+ <li>Add a user phase called RMPhase to all four flows of axis2.xml.</li>
+ <li>Download latest Sandesha2 distribution and add Sandesha2 mar file to
+ <AXIS2_WEBAPP>\WEB_INF\modules directory.</li>
+ <li>Add sandesha2.properties file to the
+ <AXIS2_WEBAPP>\WEB_INF\classes directory.</li>
+</ol>
+
+<p>Now your Sandesha2 module is setup and deployed.</p>
+
+<p></p>
+
+<p>To host reliable web service you have to create a service archive (aar)
+file with the given details (please see Axis2 user guide for more details on
+creating aar files).</p>
+
+<p>Add a module reference for Sandesha2 to the services.xml (within the aar
+file) as given below.</p>
+<pre><service name="TestService">
+<module ref="Sandesha2-0.9"/>
+.......................
+<!-- Your operation definitions and other stuff
+........................
+</service></pre>
+
+<p>Create the service archieve file.</p>
+
+<p>Deploy it by dropping it to <AXIS2_WEBAPP>/WEB-INF/services
+directory.</p>
+
+<p>Now your service is deployed with reliable messaging support.</p>
+
+<p></p>
+
+<h2>Using Sandesha2 in the client side</h2>
+
+<p>Add Sandesha2 module in the way you normally add a module to the Axis2
+client side (see Axis2 user guide for more details). Following scenarios will
+explain you how to write the client code.</p>
+
+<p></p>
+
+<h3>Basic scenarios</h3>
+<source>
+<p><b>Sample RM enabled client code for a one way service call.</b></p>
+<pre>MessageSender sender = new MessageSender (AXIS2_CLIENT_REPO_PATH);
+<span style="background-color: #CCCCCC">sender.engageModule(new QName
("Sandesha2-0.9"));</span>
+Options clientOptions = new Options ();
+sender.setClientOptions(clientOptions);
+<span style="background-color:
#CCCCCC">clientOptions.setProperty(Options.COPY_PROPERTIES,new Boolean
(true));</span>
+clientOptions.setTo(new EndpointReference(toEPR));
+sender.send("ping",getPingOMBlock("ping1"));
+sender.send("ping",getPingOMBlock("ping2"));
+<span style="background-color:
#CCCCCC">clientOptions.setProperty(Sandesha2ClientAPI.LAST_MESSAGE,
"true");</span>
+sender.send("ping",getPingOMBlock("ping3"));</pre>
+</source>
+<p>There are only three difference here from your normal client code.</p>
+
+<p>First you have to engage the sandesha module as given in the line 2.</p>
+
+<p>Make sure you set the copy properties property of the options object to
+true as given in line 5.</p>
+
+<p>Before the last message you must set the last message property, which is
+given in the line 9.</p>
+
+<p></p>
+
+<p><b>Simple RM enabled client code for a request reply service call.</b></p>
+
+<p>First thing to remember is that you are not able to get synchronous
+(single channel) responses with Sandesha2. Because of this if you expect
+response message, you must have a return endpoint accessible from the server
+side. But making two channel blocking invocations is perfectly valid. But
+please make sure tht you have set a suitable time out interval within your
+call object.</p>
+
+<p></p>
+
+<p>Here is a code sample for this scenario.</p>
+<source><pre>Call call = new Call(AXIS2_CLIENT_REPO_PATH);
+<span style="background-color: #CCCCCC">call.engageModule(new
QName("Sandesha2-0.9"));</span>
+Options clientOptions = new Options ();
+<span style="background-color:
#CCCCCC">clientOptions.setProperty(Options.COPY_PROPERTIES,new Boolean
(true));</span>
+call.setClientOptions(clientOptions);
+//Make sure set the following two properties in the request-reply case.
+<span style="background-color:
#CCCCCC">clientOptions.setListenerTransportProtocol(Constants.TRANSPORT_HTTP);</span>
+<span style="background-color:
#CCCCCC">clientOptions.setUseSeparateListener(true);</span>
+clientOptions.setTo(ne EndpointReference(toEPR));
+Callback callback1 = new TestCallback ("Callbck 1");
+call.invokeNonBlocking("echoString", getEchoOMBlock("echo1"),callback1);
+<span style="background-color:
#CCCCCC">clientOptions.setProperty(Sandesha2ClientAPI.LAST_MESSAGE,
"true");</span>
+Callback callback3 = new TestCallback ("Callback 3");
+call.invokeNonBlocking("echoString", getEchoOMBlock("echo3"),callback3);</pre>
+</source>
+<p></p>
+
+<p>Here also let me explaing the differences from a normal request-reply
+client code.</p>
+
+<p>As in the request only case that was explained before, you have to engage
+the Sandesha2 module.</p>
+
+<p>You have to tell axis enging to use a seperate channel for the responses
+as given in the line 8. Also make sure that you set the listner transport as
+given in line 7.</p>
+
+<p>Also you have to set the last message property.</p>
+
+<p></p>
+
+<h3>Advance scenarios</h3>
+
+<p><b>Getting acknowledgements and faults to a given endpoint.</b></p>
+
+<p>In the dafault configuration response path for acknowledgements and faults
+related to a sequene is the anonymous endpoint. Because of this for example
+HTTP transport will send acknowledgements and faults in the HTTP response. If
+you want to avoid this and if you want to get acknowledgements and faults to
+a different endpoing add following part to the client code before doing any
+incovation.</p>
+<pre>sender.set(Sandesha2ClientAPI.AcksTo,<endpoint>); //example
endpoint - http://tempuri.org/acks.</pre>
+
+<p></p>
+
+<p><b>Managing sequences.</b></p>
+
+<p>I the default behaviour Sandesha 2 assumes that messages going to the same
+endpoing should go in the same RM sequence. If you invoke two endpoints they
+will go in two sequences. If you want you can tell sandesha2 to start two
+sequences for the same endpoint as well. To do this you have to set a
+property called Sequence Key.</p>
+<pre>call.set(Sandesha2ClientAPI.SEQUENCE_KEY,<a string to identify the
sequence>);</pre>
+
+<p>If the sequence key is different Sandesha2 will send messages in two
+sequences even if they are sent to the same endpoint.</p>
+
+<p></p>
+
+<p><b>Offering a sequence ID for the response sequence.</b></p>
+
+<p>This is a concept of reliable messaging which may not be very useful to
+you as a user. Here what you do is offering a sequene ID for the sequence to
+be created in the response side withing the first Create Sequence Request
+message itself. with this you can avoid sending of a extra Create Sequence
+message from the server to the client. To do this add following to the client
+code.</p>
+<pre>call.set(Sandesha2ClientAPI.OFFERED_SEQUENCE_ID,<new uuid>);</pre>
+
+<p></p>
+
+<p></p>
+</body>
+</html>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]