jaliya      2005/03/15 20:22:45

  Modified:    sandesha/config WSRMPolicy.xml
               sandesha/interop server-config.wsdd
               sandesha maven.xml
               sandesha/src/org/apache/sandesha Constants.java
                        EnvelopeCreator.java
               sandesha/src/org/apache/sandesha/server Sender.java
               sandesha/src/org/apache/sandesha/util PolicyLoader.java
               sandesha/xdocs architecture.html
  Log:
  Applied the patch sent by Saminda
  
  Revision  Changes    Path
  1.2       +23 -1     ws-fx/sandesha/config/WSRMPolicy.xml
  
  Index: WSRMPolicy.xml
  ===================================================================
  RCS file: /home/cvs/ws-fx/sandesha/config/WSRMPolicy.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WSRMPolicy.xml    15 Mar 2005 05:18:32 -0000      1.1
  +++ WSRMPolicy.xml    16 Mar 2005 04:22:45 -0000      1.2
  @@ -1 +1,23 @@
  -<policy></policy>
  \ No newline at end of file
  +<wsdl:definitions 
  +     targetNamespace="example.com" 
  +     xmlns:tns="example.com" 
  +     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
  +     xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"; 
  +     xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"; 
  +     
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
 > 
  +             <wsp:UsingPolicy wsdl:required="true" /> 
  +             <wsp:Policy wsu:Id="MyPolicy" > 
  +                     <wsrm:RMAssertion> 
  +                             <wsrm:InactivityTimeout Milliseconds="600000" 
/> 
  +                             <wsrm:BaseRetransmissionInterval 
Milliseconds="3000" /> 
  +                             <wsrm:ExponentialBackoff /> 
  +                             <wsrm:AcknowledgementInterval 
Milliseconds="200" /> 
  +                     </wsrm:RMAssertion> 
  +                             <!-- omitted assertions --> 
  +             </wsp:Policy> 
  +                             <!-- omitted elements --> 
  +             <wsdl:binding name="MyBinding" type="tns:MyPortType" > 
  +                     <wsp:PolicyReference URI="#MyPolicy" />
  +                             <!-- omitted elements --> 
  +             </wsdl:binding> 
  +</wsdl:definitions>
  \ No newline at end of file
  
  
  
  1.7       +2 -2      ws-fx/sandesha/interop/server-config.wsdd
  
  Index: server-config.wsdd
  ===================================================================
  RCS file: /home/cvs/ws-fx/sandesha/interop/server-config.wsdd,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- server-config.wsdd        7 Mar 2005 12:46:12 -0000       1.6
  +++ server-config.wsdd        16 Mar 2005 04:22:45 -0000      1.7
  @@ -3,9 +3,9 @@
    <globalConfiguration>
     <parameter name="adminPassword" value="admin"/>
     <parameter name="disablePrettyXML" value="true"/>
  -  <parameter name="attachments.implementation" 
value="org.apache.axis.attachments.AttachmentsImpl"/>
  -  <parameter name="sendXsiTypes" value="true"/>
     <parameter name="sendMultiRefs" value="true"/>
  +  <parameter name="sendXsiTypes" value="true"/>
  +  <parameter name="attachments.implementation" 
value="org.apache.axis.attachments.AttachmentsImpl"/>
     <parameter name="sendXMLDeclaration" value="true"/>
     <requestFlow>
      <handler type="java:org.apache.axis.handlers.JWSHandler">
  
  
  
  1.5       +3 -1      ws-fx/sandesha/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/ws-fx/sandesha/maven.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- maven.xml 2 Mar 2005 14:26:03 -0000       1.4
  +++ maven.xml 16 Mar 2005 04:22:45 -0000      1.5
  @@ -18,12 +18,14 @@
                <copy file="config/sandesha.properties" 
todir="${maven.build.dir}/classes"/>
                <copy file="config/log4j.properties" 
todir="${maven.build.dir}/classes"/>
                <copy file="config/commons-logging.properties" 
todir="${maven.build.dir}/classes"/>
  +     <copy file="config/WSRMPolicy.xml" todir="${maven.build.dir}/classes"/>
        </preGoal>
   
        <preGoal name="interop:compile">
                <copy file="config/sandesha.properties" 
todir="${maven.build.dir}/classes"/>
                <copy file="config/log4j.properties" 
todir="${maven.build.dir}/classes"/>
                <copy file="config/commons-logging.properties" 
todir="${maven.build.dir}/classes"/>
  +     <copy file="config/WSRMPolicy.xml" todir="${maven.build.dir}/classes"/>
        </preGoal>
   
       <postGoal name="jar">
  
  
  
  1.37      +22 -11    ws-fx/sandesha/src/org/apache/sandesha/Constants.java
  
  Index: Constants.java
  ===================================================================
  RCS file: /home/cvs/ws-fx/sandesha/src/org/apache/sandesha/Constants.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- Constants.java    12 Mar 2005 19:14:57 -0000      1.36
  +++ Constants.java    16 Mar 2005 04:22:45 -0000      1.37
  @@ -34,13 +34,14 @@
       public static final String COLON = ":";
       public static final String SLASH = "/";
       public static final String UUID = "uuid:";
  -    public static final String ASTERISK="*";
  +    public static final String ASTERISK = "*";
   
       public static final String URL_RM_SERVICE = "/axis/services/RMService";
       public static final String IGNORE_ACTION = "ignoreAction";
   
  -
       public static final long RETRANSMISSION_INTERVAL = 4000;
  +    public static final long ACKNOWLEDGEMENT_INTERVAL = 200;
  +    public static final long INACTIVITY_TIMEOUT = 600000;
       public static final int MAXIMUM_RETRANSMISSION_COUNT = 20;
       public static final long RMINVOKER_SLEEP_TIME = 2000;
       public static final long SENDER_SLEEP_TIME = 2000;
  @@ -86,7 +87,7 @@
           public static final String SEQUENCE_ACK = "SequenceAcknowledgement";
           public static final String TERMINATE_DEQUENCE = "TerminateSequence";
           public static final String SEQUENCE_FAULT = "SequenceFault";
  -        public static final String ACKS_TO="AcksTo";
  +        public static final String ACKS_TO = "AcksTo";
           public static final String SEQUENCE_OFFER = "Offer";
   
           public static final double MAX_MSG_NO = 18446744073709551615d;
  @@ -145,10 +146,10 @@
           public static final String SENDING_REQ = "INFO: SENDING REQUEST 
MESSAGE ....\n";
           public static final String SENDING_RES = "INFO: SENDING RESPONSE 
MESSAGE ....\n";
           public static final String PROVIDER_RECEIVED_MSG = "INFO: RMPROVIDER 
RECEIVED A SOAP REQUEST....\n";
  -        public static final String SENDER_STARTED="INFO: SENDER STARTED 
....\n";
  -        public static final String RMINVOKER_STARTED="INFO: RMINVOKER 
STARTED ....\n";
  -         public static final String WAITING_TO_STOP_CLIENT="INFO: WATING TO 
STOP CLIENT ....\n";
  -        public static final String CLIENT_LISTENER_STARTED ="NFO: CLIENT 
LISTENER STARTED ....\n";
  +        public static final String SENDER_STARTED = "INFO: SENDER STARTED 
....\n";
  +        public static final String RMINVOKER_STARTED = "INFO: RMINVOKER 
STARTED ....\n";
  +        public static final String WAITING_TO_STOP_CLIENT = "INFO: WATING TO 
STOP CLIENT ....\n";
  +        public static final String CLIENT_LISTENER_STARTED = "NFO: CLIENT 
LISTENER STARTED ....\n";
   
       }
   
  @@ -169,6 +170,7 @@
       public interface ClientProperties {
   
           public static final String PROPERTY_FILE = "sandesha.properties";
  +        public static final String WSRM_POLICY_FILE = "WSRMPolicy.xml";
   
           public static final String CLIENT_LISTENER_PORT = 
"CLIENT_LISTENER_PORT";
           public static final String SIMPLE_AXIS_SERVER_PORT_POPERTY = 
"SIMPLE_AXIS_SERVER_PORT";
  @@ -189,10 +191,19 @@
           public static final String PROVIDER_CLASS = "providerClass";
           public static final String DEFAULT_PROVIDER_CLASS = 
"org.apache.axis.providers.java.RPCProvider";
   
  -        public static final String CLASS_NAME="className";
  -         public static final String RMSERVICE="RMService";
  -        public static final String 
RMSERVICE_CLASS="org.apache.sandesha.client.RMService";
  -        public static final String ALLOWED_METHODS="allowedMethods";
  +        public static final String CLASS_NAME = "className";
  +        public static final String RMSERVICE = "RMService";
  +        public static final String RMSERVICE_CLASS = 
"org.apache.sandesha.client.RMService";
  +        public static final String ALLOWED_METHODS = "allowedMethods";
  +    }
  +
  +    public interface WSRMPolicy {
  +        public final String INA_TIMEOUT = "InactivityTimeout";
  +        public final String BASE_TX_INTERVAL = "BaseRetransmissionInterval";
  +        public final String ACK_INTERVAL = "AcknowledgementInterval";
  +        public final String EXP_BACKOFF = "ExponentialBackoff";
  +
  +        public final String WSRM = 
"http://schemas.xmlsoap.org/ws/2005/02/rm/policy";;
       }
   }
   
  
  
  
  1.25      +4 -1      
ws-fx/sandesha/src/org/apache/sandesha/EnvelopeCreator.java
  
  Index: EnvelopeCreator.java
  ===================================================================
  RCS file: 
/home/cvs/ws-fx/sandesha/src/org/apache/sandesha/EnvelopeCreator.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- EnvelopeCreator.java      12 Mar 2005 19:16:14 -0000      1.24
  +++ EnvelopeCreator.java      16 Mar 2005 04:22:45 -0000      1.25
  @@ -337,9 +337,12 @@
           outGoingAddressingHaders.setTo(addressingHeaders.getTo());
           if (addressingHeaders.getReplyTo() != null)
               
outGoingAddressingHaders.setReplyTo(addressingHeaders.getReplyTo());
  -
  +        try{
           Action action = new Action(new URI(rmMessageContext.getAction()));
           outGoingAddressingHaders.setAction(action);
  +        }catch(Exception e){
  +           e.printStackTrace();
  +        }
   
           //Set the addressing headers to the SOAPEnvelope.
           outGoingAddressingHaders.toEnvelope(requestEnvelope, null);
  
  
  
  1.31      +3 -2      ws-fx/sandesha/src/org/apache/sandesha/server/Sender.java
  
  Index: Sender.java
  ===================================================================
  RCS file: 
/home/cvs/ws-fx/sandesha/src/org/apache/sandesha/server/Sender.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- Sender.java       7 Mar 2005 05:34:34 -0000       1.30
  +++ Sender.java       16 Mar 2005 04:22:45 -0000      1.31
  @@ -30,6 +30,7 @@
   import org.apache.sandesha.RMMessageContext;
   import org.apache.sandesha.server.msgprocessors.IRMMessageProcessor;
   import org.apache.sandesha.storage.dao.SandeshaQueueDAO;
  +import org.apache.sandesha.util.PolicyLoader;
   import org.apache.sandesha.ws.rm.RMHeaders;
   
   import javax.xml.rpc.ServiceException;
  @@ -92,9 +93,9 @@
                       hasMessages = false;
                   } else {
                       //Send the message.
  -                    if ((rmMessageContext.getReTransmissionCount() <= 
Constants.MAXIMUM_RETRANSMISSION_COUNT)
  +                    if ((rmMessageContext.getReTransmissionCount() <= 
PolicyLoader.getInstance().getRetransmissionCount())
                               && ((System.currentTimeMillis() - 
rmMessageContext
  -                            .getLastPrecessedTime()) > 
Constants.RETRANSMISSION_INTERVAL)) {
  +                            .getLastPrecessedTime()) > 
PolicyLoader.getInstance().getBaseRetransmissionInterval())) {
                           try {
                               sendMessage(rmMessageContext);
                           } catch (AxisFault e) {
  
  
  
  1.2       +150 -1    
ws-fx/sandesha/src/org/apache/sandesha/util/PolicyLoader.java
  
  Index: PolicyLoader.java
  ===================================================================
  RCS file: 
/home/cvs/ws-fx/sandesha/src/org/apache/sandesha/util/PolicyLoader.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PolicyLoader.java 15 Mar 2005 05:14:45 -0000      1.1
  +++ PolicyLoader.java 16 Mar 2005 04:22:45 -0000      1.2
  @@ -1,3 +1,152 @@
  +/*
  +* Copyright 1999-2004 The Apache Software Foundation.
  +*
  +* Licensed 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.
  +*
  +*/
  +package org.apache.sandesha.util;
  +
  +/**
  + * @author Saminda Wishwajith Abeyruwan
  + *
  + */
  +
  +
  +
  +import java.io.InputStream;
  +
  +import javax.xml.parsers.DocumentBuilder;
  +import javax.xml.parsers.DocumentBuilderFactory;
  +
  +
  +import org.w3c.dom.Attr;
  +import org.w3c.dom.Document;
  +import org.w3c.dom.Element;
  +import org.w3c.dom.NamedNodeMap;
  +import org.w3c.dom.NodeList;
  +
  +import org.apache.axis.components.logger.LogFactory;
  +import org.apache.commons.logging.Log;
  +import org.apache.sandesha.Constants;
  +
  +
   public class PolicyLoader{
   
  -}
  \ No newline at end of file
  +     private static final Log log = 
LogFactory.getLog(PolicyLoader.class.getName());
  +
  +     private long inactivityTimeout;
  +     private long baseRetransmissionInterval;
  +     private long acknowledgementInterval;
  +     private String exponentialBackoff;
  +
  +     private DocumentBuilderFactory  factory;
  +     private DocumentBuilder builder;
  +     private Document document;
  +
  +     private static PolicyLoader instance;
  +     private static boolean policyInstance = false;
  +
  +     private Element rootNodeElement;
  +
  +     private PolicyLoader (){
  +             policyInstance = true;
  +     }
  +
  +     public static PolicyLoader getInstance (){
  +             if (policyInstance == false)
  +                     return instance = new PolicyLoader();
  +             else
  +                     return instance;
  +     }
  +
  +     public int getRetransmissionCount () {
  +             return Constants.MAXIMUM_RETRANSMISSION_COUNT;
  +     }
  +
  +     public long getInactivityTimeout (){
  +             helper();
  +             if (inactivityTimeout == 0)
  +                     return Constants.INACTIVITY_TIMEOUT;
  +             else
  +                     return inactivityTimeout;
  +     }
  +
  +     public long getBaseRetransmissionInterval (){
  +             helper();
  +             if (baseRetransmissionInterval == 0)
  +                     return Constants.RETRANSMISSION_INTERVAL;
  +             else
  +                     return baseRetransmissionInterval;
  +     }
  +
  +     public long getAcknowledgementInterval () {
  +             helper();
  +             if (acknowledgementInterval == 0)
  +                     return Constants.ACKNOWLEDGEMENT_INTERVAL;
  +             else
  +                     return acknowledgementInterval;
  +     }
  +
  +     public String getExponentialBackoff () {
  +             helper();
  +             return exponentialBackoff;
  +     }
  +
  +     public void helper () {
  +                     init();
  +                     try{
  +                             inactivityTimeout = 
getAttributeValue(Constants.WSRMPolicy.WSRM,Constants.WSRMPolicy.INA_TIMEOUT);
  +                             baseRetransmissionInterval = 
getAttributeValue(Constants.WSRMPolicy.WSRM, 
Constants.WSRMPolicy.BASE_TX_INTERVAL);
  +                             acknowledgementInterval = 
getAttributeValue(Constants.WSRMPolicy.WSRM, Constants.WSRMPolicy.ACK_INTERVAL);
  +                             exponentialBackoff = 
getExpBackoffInterval(Constants.WSRMPolicy.WSRM, 
Constants.WSRMPolicy.EXP_BACKOFF);
  +                     }catch(Exception e){
  +                             e.printStackTrace();
  +                     }
  +     }
  +
  +     private long getAttributeValue(String namespaceURI, String elementName) 
{
  +             NodeList list = 
rootNodeElement.getElementsByTagNameNS(namespaceURI,elementName);
  +             NamedNodeMap map = list.item(0).getAttributes();
  +             Attr att = (Attr)map.item(0);
  +             String value = att.getNodeValue();
  +             return Long.parseLong(value.trim());
  +
  +     }
  +     private String getExpBackoffInterval(String namespaceURI,String 
elementName){
  +             NodeList list = 
rootNodeElement.getElementsByTagNameNS(namespaceURI,elementName);
  +             String name = list.item(0).getLocalName();
  +             return name;
  +     }
  +
  +     private void init() {
  +             try{
  +                     factory = DocumentBuilderFactory.newInstance();
  +                     factory.setNamespaceAware(true);
  +                     builder = factory.newDocumentBuilder();
  +                     InputStream in = 
Thread.currentThread().getContextClassLoader().getResourceAsStream(Constants.ClientProperties.WSRM_POLICY_FILE);
  +
  +                     if ( in != null){
  +                             document = builder.parse(in);
  +                             rootNodeElement = document.getDocumentElement();
  +                     }
  +                     else
  +                             log.error("No WSRMPolicy.xml Found");
  +             }catch (Exception e){
  +                     e.printStackTrace();
  +             }
  +     }
  +
  +
  +
  +
  +}
  
  
  
  1.2       +99 -79    ws-fx/sandesha/xdocs/architecture.html
  
  Index: architecture.html
  ===================================================================
  RCS file: /home/cvs/ws-fx/sandesha/xdocs/architecture.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- architecture.html 15 Mar 2005 05:14:45 -0000      1.1
  +++ architecture.html 16 Mar 2005 04:22:45 -0000      1.2
  @@ -8,46 +8,50 @@
        font-size: 14px;
        color: #990000;
   }
  + li.MsoNormal
  +     {mso-style-parent:"";
  +     margin-bottom:.0001pt;
  +     font-size:12.0pt;
  +     font-family:"Times New Roman";
  +     margin-left:0in; margin-right:0in; margin-top:0in}
   </style>
   
   </head>
   
   <body>
   
  -<h1><font face="Times New Roman">Architecture Guide of Apache 
Sandesha</font></h1>
  -<p><font face="Times New Roman">Apache Sandesha is implemented on top of the 
  +<h1><font size="6">Architecture Guide of Apache Sandesha</font></h1>
  +<p>Apache Sandesha is implemented on top of the 
   current version of Apache Axis. In-order to support the reliable message 
   delivery in web services there are set of new messages that needs to be 
passed 
   between the parties to the communication. According to the 
WS-RelibleMessging 
   specification these messages are exchanged between the RM Source and the RM 
   Destination and enable the delivery assurance. Rest of the this architecture 
   guide will focus on how Apache Sandesha has achieved the above goal and its 
  -architecture.</font></p>
  -<h2><font face="Times New Roman">The Model</font></h2>
  -<p class="MsoNormal" style="text-align:justify">
  -<span style="font-family: Times New Roman">WS-ReliableMessaging protocol 
  +architecture.</p>
  +<h2><font size="5">The Model</font></h2>
  +<p>
  +WS-ReliableMessaging protocol 
   provides the solution for the reliable delivery of messages based on the 
pattern
   <i>end-point managers</i>. The model proposed by the specification is as 
  -follows, see [1].</span></p>
  -<p class="MsoNormal" style="text-align:center">
  +follows, see [1].</p>
  +<p align="center">
   <img border="0" src="images/RMModel.jpg" width="320" height="183"></p>
  +</p>
   <p align="center">
   <p align="center">
   <font size="2">Figure 1: The Reliable Messaging Model</font></p>
  -<h2 align="left"><font face="Times New Roman">Architecture of Apache 
Sandesha</font></h2>
  -<p class="MsoBodyText"><font face="Times New Roman">The architecture of 
Sandesha 
  -was mainly guided by the requirements of the WS-ReliableMessaging protocol 
and 
  +<h2 align="left">Architecture of Apache Sandesha</h2>
  +<p>The architecture of Sandesha was mainly guided by the requirements of the 
WS-ReliableMessaging protocol and 
   the Axis Architecture [2]. According to the specification it is a core 
  -requirement that the RM Source has an endpoint reference.</font></p>
  -<blockquote>
  -  <p class="MsoNormal" style="text-align: justify; text-autospace: none">
  -  <span style="font-family: Times New Roman">&nbsp;</span><i><span 
style="font-family: Times New Roman">�The 
  +requirement that the RM Source has an endpoint reference.</p>
  +<p>  &nbsp;<i>�The 
     RM Source MUST have an endpoint reference that uniquely identifies the RM 
     Destination endpoint; correlations across messages addressed to the unique 
  -  endpoint MUST be meaningful.�</span></i><span style="font-family: Times 
New Roman">[1]</span></p>
  -</blockquote>
  -<p class="MsoNormal" style="text-align:justify">
  -<span style="font-family: Times New Roman">&nbsp;As a consequence to the 
above fact 
  +  endpoint MUST be meaningful.�</i>[1]
  +</p>
  +<p>
  +&nbsp;As a consequence to the above fact 
   the Sandesha architecture cannot utilize the default synchronous message 
pattern 
   provided by the Axis engine for asynchronous invocations. A separate end 
point 
   reference is required for the RM Source. Similarly the server end point 
manger 
  @@ -56,64 +60,61 @@
   In order to support the connectivity between the sender and the receiver 
with 
   respect to particular end point manager Sandesha architecture uses an 
in-memory 
   Queue by default. The architecture providers the capability to plug a 
database 
  -instead of a Queue, which will ultimately, leads to the persistence. 
</span></p>
  -<p class="MsoNormal" style="text-align:justify">
  -<span style="font-family: Times New Roman">So at this point the top level 
  -architecture would be explained using the following diagram.</span></p>
  -<p class="MsoNormal" style="text-align:center">
  +instead of a Queue, which will ultimately, leads to the persistence. </p>
  +<p>
  +So at this point the top level 
  +architecture would be explained using the following diagram.</p>
  +<p align="center">
   <img border="0" src="images/Architecture.jpg" width="440" height="201"></p>
  -<p class="MsoNormal" style="text-align:center">
  +<p align="center">
   <font size="2">Figure 2: High Level Architecture of Apache 
Sandesha</font></p>
  -<p class="MsoNormal" style="text-align: center">
  -&nbsp;</p>
  -<p style="text-align:justify"><span style="font-family: Times New 
Roman">This 
  +
  +<p >This 
   architecture provides a complete support for both synchronous and 
asynchronous 
   messaging scenarios. WS-Addressing [3] provides the information for the 
   correlation of messages when the asynchronous pattern is adopted. However 
with 
   the use of two way transports (like HTTP), there is a possibility that the 
   Acknowledgements for the requests to be sent using the same connection. As 
shown 
   using the dotted lines) So the sender in both the sides should be able to 
handle 
  -that accordingly. </span></p>
  -<h2 style="text-align:justify"><font face="Times New Roman">Sandesha 
  -architecture on top of Apache Axis</font></h2>
  -<p style="text-align:justify" align="center">
  -<span style="font-family: Times New Roman">A more detailed view of the 
  +that accordingly. </p>
  +<h2 >Sandesha 
  +architecture on top of Apache Axis</h2>
  +<p  align="center"></p>
  +A more detailed view of the 
   architecture will emerge when the Axis specific components are added to the 
  -above diagram. A complete diagram would be as follows.</span></p>
  +above diagram. A complete diagram would be as follows.</p>
   <p align="center">
   <img border="0" src="images/Architecture2.jpg" width="637" height="219"></p>
   <p align="center">
   <font size="2">Figure 3: Sandesha Architecture on top of Apache 
Axis</font></p>
  -<p style="text-align:justify"><span style="font-family: Times New Roman">The 
  +<p >The 
   individual components and the message paths in the above diagram can be 
  -described in more detailed as follows. </span></p>
  -<h3 style="text-align:justify"><span style="font-family: Times New 
Roman">Client</span></h3>
  -<p style="text-align:justify"><span style="font-family: Times New 
Roman">This is 
  +described in more detailed as follows. </p>
  +<h3 >Client</h3>
  +<p >This is 
   the program that invokes (utilize) the web service. According to the 
high-level 
  -architecture this is the Application Source<b>.</b></span></p>
  -<h3 style="text-align:justify"><span style="font-family: Times New 
Roman">Axis 
  -Engine</span></h3>
  -<p style="text-align:justify"><span style="font-family: Times New 
Roman">This is 
  -the apache Axis. </span><font face="Times New Roman">Axis is essentially a
  -</font><span style="font-family: Verdana"><em>
  -<span style="font-family: Times New Roman">SOAP engine 
-</span></em></span><font face="Times New Roman"> 
  +architecture this is the Application Source<b>.</b></p>
  +<h3 >Axis 
  +Engine</h3>
  +<p >This is 
  +the apache Axis. Axis is essentially a SOAP engine 
   a framework for constructing SOAP processors such as clients, servers, 
gateways, 
  -etc.</font></p>
  -<h3 style="text-align:justify"><font face="Times New 
Roman">RMSender</font></h3>
  -<p style="text-align:justify"><font face="Times New Roman">This is the 
transport 
  +etc.</p>
  +<h3 >RMSender</h3>
  +<p >This is the transport 
   sender that the user should use in order to enable reliability in the client 
   side Axis Engine. However RMSender will not directly write the request to 
the 
  -transport layer, instead it will insert the request to a Queue. </font></p>
  -<h3 style="text-align:justify"><font face="Times New Roman">Queue</font></h3>
  -<p style="text-align:justify">This is the persistence layer for Sandesha. 
  +transport layer, instead it will insert the request to a Queue. </p>
  +<h3 >Queue</h3>
  +<p >This is the persistence layer for Sandesha. 
   Currently the solution for reliability is achieved using an in-memory Queue. 
But 
   Sandesha provides an extensible storage manager for the storage and hence 
   replacing the Queue with a database is fairly easy. Although the Queue acts 
as a 
   single component, it will maintain two Queues for incoming and out going 
   messages internally.</p>
  -<h3 style="text-align:justify"><b><span style="font-family: Times New Roman">
  -Sender</span></b></h3>
  -<p style="text-align:justify">This is a running thread to send the request 
  +<h3 ><b>
  +Sender</b></h3>
  +<p >This is a running thread to send the request 
   messages. Sandesha uses the same sender in the server side to send the 
responses 
   (if any) to the client asynchronously. <br>
   When the Sender sends a request using by directional transport protocol 
(e.g. 
  @@ -122,41 +123,49 @@
   connection. However, it should be noted that Sandesha is not expecting any 
   application responses over the same connection. <br>
   &nbsp;</p>
  -<h3 style="text-align:justify">Receiver</h3>
  -<p style="text-align:justify">This is the listener for the client side and 
it is 
  +<h3 >Receiver</h3>
  +<p >This is the listener for the client side and it is 
   the SimpleAxisServer that is used as the receiver for Sandesha. The 
   functionality of the Receiver is to accept the asynchronous SOAP messages 
and to 
   insert them to the Queue according to the correlation information present in 
the 
   message itself.</p>
  -<h3 style="text-align:justify">RMProvider</h3>
  -<p style="text-align:justify">This is the provider used by Sandesha inside 
the 
  +<h3 >RMProvider</h3>
  +<p >This is the provider used by Sandesha inside the 
   Axis engine in the server side. RMProvider will identify the incoming 
message 
   and insert the required message or messages to the Queue. It will also 
generate 
   messages for Reliable Messaging specific messages such as 
&lt;wsrm:AckRequested&gt;, 
   see [3].</p>
  -<h3 align="left"><font face="Times New Roman">RMInvoker</font></h3>
  +<h3 align="left"><fonts>RMInvoker</h3>
   <p align="left">This is a runnable component that actually handles the 
   dispatching of the web service request to the actual service. RMInvoker will 
   also put the service response (if any) to the Queue present in the server 
side.</p>
   <h3 align="left">Service</h3>
  -<p style="text-align:justify">
  -<span style="font-family: Times New Roman">This is the actual web 
  +<p >
  +This is the actual web 
   service, which will be the Application Destination according to the 
high-level 
  -architecture.</span></p>
  -<h2 style="text-align:justify">
  -<span style="font-family: Times New Roman">Messaging Scenarios</span></h2>
  -<p style="text-align:justify">
  +architecture.</p>
  +<h2 >
  +Messaging Scenarios</h2>
  +<p >
   There are many messaging scenarios that can be used to consume web services. 
   These combinations are created mainly by the usage of the WS-Addressing 
headers 
   and the MEPs of the service. Following sequence diagrams will explain some 
of 
   the possible combinations.</p>
  -<h3 style="text-align:justify">
  +<h3 >
   Client Side - Request Only with Synchronous Acknowledgement</h3>
  +<p >
  +In this scenario, client makes a service request to a service with one way 
  +operation. Client has specified that the operations are synchronous in 
nature. 
  +So the RMSource will include the anonymous URI for the &lt;wsa:From&gt; EPR 
of the out 
  +going messages. So the sequence acknowledgement will come only on the same 
  +connection.</p>
   <p style="text-align:center">
   <img border="0" src="images/PingSync.png" width="717" height="360"></p>
   <p style="text-align:center">
   <font size="2">Figure 4: Client Side - Request Only with Synchronous 
   Acknowledgement</font></p>
  +<p style="text-align:center">
  +&nbsp;</p>
   <h3 style="text-align: justify;">Client Side - Initialization</h3>
   <p style="text-align: justify;">This is happening only at the first message 
of a 
   particular sequence. Web service client should initialize the reliable 
messaging 
  @@ -167,11 +176,11 @@
   <img border="0" src="images/ClientInitialization.png" width="556" 
height="250"></p>
   <p style="text-align:center">
   <font size="2">Figure 5: Client Side - Initialization</font></p>
  -<p style="text-align: center">
  +<p style="text-align:center">
   &nbsp;</p>
  -<h3 style="text-align:justify">
  +<h3 >
   Client Side - Termination</h3>
  -<p style="text-align:justify">
  +<p >
   This is happening only after the last message of a 
   particular sequence. Web service client should terminate the RM Environment 
   after receiving all the messages.&nbsp; This can be done by calling the 
method&nbsp; 
  @@ -182,11 +191,11 @@
   <img border="0" src="images/ClientTermination.png" width="556" 
height="259"></p>
   <p style="text-align:center">
   <font size="2">Figure 6: Client Side - Termination</font></p>
  -<h3 style="text-align:justify">
  -&nbsp;</h3>
  -<h3 style="text-align:justify">
  +<p style="text-align:center">
  +&nbsp;</p>
  +<h3 >
   Client Side - Request Only with Asynchronous Acknowledgement</h3>
  -<p style="text-align:justify">
  +<p >
   In this scenario client invoke a web service with one-way operation. When 
   sending the service requests the RMSource will include the client side 
endpoint 
   reference in the &lt;wsa:From&gt; address. So the sequence acknowledgements 
will be 
  @@ -196,17 +205,17 @@
   <p style="text-align:center">
   <font size="2">Figure 7: Client Side - Request Only with Asynchronous 
   Acknowledgement</font></p>
  -<h3 style="text-align:justify">
  -&nbsp;</h3>
  -<h3 style="text-align:justify">
  +<p style="text-align:center">
  +&nbsp;</p>
  +<h3 >
   Client Side - Request Response with Synchronous Acknowledgement</h3>
  -<p style="text-align:justify">
  +<p >
   In this scenario client invoke a web service with two-way operation. When 
   sending the service requests the RMSource will include the anonymous URI in 
the 
   &lt;wsa:From&gt; address. So the sequence acknowledgements will be sent 
through the 
   same one use for the request (note that; this can only be used with two way 
   transports).</p>
  -<p style="text-align:justify">
  +<p >
   &nbsp;</p>
   <p style="text-align:center">
   <img border="0" src="images/EchoSync.png" width="814" height="403"></p>
  @@ -298,7 +307,18 @@
   failures. This can be achieved using a database as the storage for SOAP 
messages 
   instead of an in-memory Queue. The future developments will mainly focus on 
this 
   area and also to implement Sandesha on top of Apache Axis 2, which is the 
new 
  -version of Axis still under development.<br>
  +version of Axis still under development.</p>
  +
  +<h2 align="left">References</h2>
  +
  +<p align="left">1. WS-RelliableMessaging protocol, available at 
  
+ftp://www6.software.ibm.com/software/developer/library/ws-reliablemessaging200502.pdf<br>
  +2. Apache Axis Architecture, available at 
http://ws.apache.org/Axis/java/architecture-guide.html
  +<br>
  +3. WS-Addressing specification, available at 
  +http://www.w3.org/Submission/2004/SUBM-ws-addressing-20040810/</p>
  +
  +<p align="left"><br>
   &nbsp;</p>
   
   </body>
  
  
  

Reply via email to