blob: e90bcfae5dd3b9cd493a4e020c2951716cc309f1 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
<TITLE></TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 1.1.4 (Win32)">
<META NAME="AUTHOR" CONTENT="Chamikara Jayalath">
<META NAME="CREATED" CONTENT="20050923;21203268">
<META NAME="CHANGEDBY" CONTENT="Chamikara Jayalath">
<META NAME="CHANGED" CONTENT="20050923;22064610">
</HEAD>
<BODY LANG="en-US" DIR="LTR">
<H2><U><B>Sample application to demonstrate the functionality of
service groups</B></U></H2>
<P>Service Groups are a brand new concept introduced by Axis2. With
Service Groups, users can group several services together. This
concept gives two main advantages to users.</P>
<OL>
<LI><P>Several related services can be easily managed and deployed.</P>
<LI><P>Can share information between different services of the same
Service Group at run time.</P>
</OL>
<P>This sample application demonstrate how you can create a service
group and how you can use the functionalities offered by axis2 to
share information between services of the same group at runtime.</P>
<P><BR><BR>
</P>
<P><U>The idea</U></P>
<P STYLE="text-decoration: none">The ides behind the sample is pretty
simple. We have developed a Calculator service group with three
services AddService, SubstractService and MultiplyService. Each
service has two operations. For e.g. AddServices has a 'add'
operation and a 'addPrevious' operation.
</P>
<P STYLE="text-decoration: none">The 'add' operation is used to add
two integers and produce a result. When a operation is run the result
will be saved in the current ServiceGroupContext which is the Context
that has to be used to share information between services of the same
service group.</P>
<P STYLE="text-decoration: none">When the addPrevious operation is
run (which takes a single integer as the parameter) the saved value
of the last operation will be added to the integer values that comes
as a parameter.</P>
<P STYLE="text-decoration: none">You can even call operations of the
other two services. These services can also use the value saved from
the previous operation.</P>
<P STYLE="text-decoration: none">You can use the client class
provided to run this in a interactive manner.</P>
<P><U>How to run the sample</U></P>
<P>Please run axis2 and deploy the provided Calculator.aar service by
simply dropping it to the Axis2_webapp/WEB-INF/services directory (see
axis user guide for more details).</P>
<P>Run the run.bat file.</P>
<P>You will see the following screen.</P>
<P><BR><BR>
</P>
<P><IMG SRC="images/image1.JPG" NAME="Graphic1" ALIGN=LEFT WIDTH=701 HEIGHT=168 BORDER=0><BR CLEAR=LEFT><BR><BR>
</P>
<P>Select 'n' to start a new round.</P>
<P><BR><BR>
</P>
<P><IMG SRC="images/image2.JPG" NAME="Graphic2" ALIGN=LEFT WIDTH=701 HEIGHT=211 BORDER=0><BR CLEAR=LEFT><BR><BR>
</P>
<P>Now select the service. + for AddService, - for SubstractService,
* for MultiplyService. And press enter.
</P>
<P>Enter the two parameters.</P>
<P>You will see the result.</P>
<P><BR><BR>
</P>
<P><IMG SRC="images/image3.JPG" NAME="Graphic3" ALIGN=LEFT WIDTH=701 HEIGHT=231 BORDER=0><BR CLEAR=LEFT><BR><BR>
</P>
<P>Now select the option 'c' to continue the round. Select the
operation. You have to give a single parameter and press enter.</P>
<P>The result will be generated using the entered valus and the
result of the previous operation (which is obtained from the
ServiceGroupContext).</P>
<P><BR><BR>
</P>
<P><IMG SRC="images/image4.JPG" NAME="Graphic4" ALIGN=LEFT WIDTH=701 HEIGHT=307 BORDER=0><BR CLEAR=LEFT><BR><BR>
</P>
<P>You can continue this interactively any number of times.</P>
<P><BR><BR>
</P>
</BODY>
</HTML>