You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by gd...@apache.org on 2007/03/04 19:17:07 UTC

svn commit: r514453 [12/26] - in /webservices/axis2/trunk/java/modules/kernel: src/org/apache/axis2/ src/org/apache/axis2/addressing/ src/org/apache/axis2/addressing/wsdl/ src/org/apache/axis2/builder/ src/org/apache/axis2/client/ src/org/apache/axis2/...

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/java/security/AccessController.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/java/security/AccessController.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/java/security/AccessController.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/java/security/AccessController.java Sun Mar  4 10:16:54 2007
@@ -27,35 +27,35 @@
 /**
  * This utility wrapper class is created to support AXIS2 runs
  * inside of Java 2 Security environment. Due to the access control
- * checking algorithm, for Java 2 Security to function properly, 
+ * checking algorithm, for Java 2 Security to function properly,
  * <code>doPrivileged()</code>
- * is required in cases where there is application code on the stack frame 
- * accessing the system resources (ie, read/write files, opening ports, and etc). 
+ * is required in cases where there is application code on the stack frame
+ * accessing the system resources (ie, read/write files, opening ports, and etc).
  * This class also improve performance no matther Security Manager is being enabled
- * or not. 
+ * or not.
  * <p/>
  * Note: This utility should be used properly, otherwise might introduce
  * security holes.
  * <p/>
  * Usage Example:
  * <code>
- *  public void changePassword() {
- *      ...
- *      AccessController.doPrivileged(new PrivilegedAction() {
- *          public Object run() {
- *              f = Util.openPasswordFile();
- *              ...
+ * public void changePassword() {
+ * ...
+ * AccessController.doPrivileged(new PrivilegedAction() {
+ * public Object run() {
+ * f = Util.openPasswordFile();
+ * ...
  * <p/>
- *          }
- *      });
- *      ...
- *  }
+ * }
+ * });
+ * ...
+ * }
  * </code>
  */
 
 
 public class AccessController {
-    
+
     /**
      * Performs the specified <code>PrivilegedAction</code> with privileges
      * enabled if a security manager is present.
@@ -71,7 +71,7 @@
     public static Object doPrivileged(PrivilegedAction action) {
         SecurityManager sm = System.getSecurityManager();
         if (sm == null) {
-            return(action.run());
+            return (action.run());
         } else {
             return java.security.AccessController.doPrivileged(action);
         }
@@ -90,10 +90,10 @@
      * If the action's <code>run</code> method throws an (unchecked) exception,
      * it will propagate through this method.
      *
-     * @param action the action to be performed.
+     * @param action  the action to be performed.
      * @param context an <i>access control context</i> representing the
-     *            restriction to be applied to the caller's domain's
-     *            privileges before performing the specified action.                   
+     *                restriction to be applied to the caller's domain's
+     *                privileges before performing the specified action.
      * @return the value returned by the action's <code>run</code> method.
      * @see #doPrivileged(PrivilegedAction)
      * @see #doPrivileged(PrivilegedExceptionAction,AccessControlContext)
@@ -109,7 +109,7 @@
 
     /**
      * Performs the specified <code>PrivilegedExceptionAction</code> with
-     * privileges enabled.  The action is performed with <i>all</i> of the 
+     * privileges enabled.  The action is performed with <i>all</i> of the
      * permissions possessed by the caller's protection domain.
      * <p/>
      * If the action's <code>run</code> method throws an <i>unchecked</i>
@@ -118,11 +118,12 @@
      * @param action the action to be performed.
      * @return the value returned by the action's <code>run</code> method.
      * @throws PrivilgedActionException the specified action's
-     *         <code>run</code> method threw a <i>checked</i> exception.
+     *                                  <code>run</code> method threw a <i>checked</i> exception.
      * @see #doPrivileged(PrivilegedExceptionAction,AccessControlContext)
      * @see #doPrivileged(PrivilegedAction)
      */
-    public static Object doPrivileged(PrivilegedExceptionAction action) throws PrivilegedActionException {
+    public static Object doPrivileged(PrivilegedExceptionAction action)
+            throws PrivilegedActionException {
         SecurityManager sm = System.getSecurityManager();
         if (sm == null) {
             try {
@@ -139,7 +140,7 @@
 
 
     /**
-     * Performs the specified <code>PrivilegedExceptionAction</code> with 
+     * Performs the specified <code>PrivilegedExceptionAction</code> with
      * privileges enabled and restricted by the specified
      * <code>AccessControlContext</code>.  The action is performed with the
      * intersection of the the permissions possessed by the caller's
@@ -149,19 +150,20 @@
      * If the action's <code>run</code> method throws an <i>unchecked</i>
      * exception, it will propagate through this method.
      *
-     * @param action the action to be performed.
+     * @param action  the action to be performed.
      * @param context an <i>access control context</i> representing the
-     *            restriction to be applied to the caller's domain's
-     *            privileges before performing the specified action.
+     *                restriction to be applied to the caller's domain's
+     *                privileges before performing the specified action.
      * @return the value returned by the action's <code>run</code> method.
      * @throws PrivilegedActionException the specified action's
-     *         <code>run</code> method
-     *         threw a <i>checked</i> exception.
+     *                                   <code>run</code> method
+     *                                   threw a <i>checked</i> exception.
      * @see #doPrivileged(PrivilegedAction)
      * @see #doPrivileged(PrivilegedExceptionAction,AccessControlContext)
      */
-    public static Object doPrivileged(PrivilegedExceptionAction action, AccessControlContext context)
-        throws PrivilegedActionException {
+    public static Object doPrivileged(PrivilegedExceptionAction action,
+                                      AccessControlContext context)
+            throws PrivilegedActionException {
 
         SecurityManager sm = System.getSecurityManager();
         if (sm == null) {
@@ -177,7 +179,7 @@
         }
     }
 
-    /** 
+    /**
      * This method takes a "snapshot" of the current calling context, which
      * includes the current Thread's inherited AccessControlContext,
      * and places it in an AccessControlContext object. This context may then
@@ -190,22 +192,22 @@
         return java.security.AccessController.getContext();
     }
 
-    /** 
+    /**
      * Determines whether the access request indicated by the
      * specified permission should be allowed or denied, based on
-     * the security policy currently in effect. 
+     * the security policy currently in effect.
      * This method quietly returns if the access request
-     * is permitted, or throws a suitable AccessControlException otherwise. 
+     * is permitted, or throws a suitable AccessControlException otherwise.
      *
      * @param perm the requested permission.
      * @throws AccessControlException if the specified permission
-     * is not permitted, based on the current security policy.
+     *                                is not permitted, based on the current security policy.
      */
     public static void checkPermission(Permission perm) throws AccessControlException {
         java.security.AccessController.checkPermission(perm);
     }
 
-    /** 
+    /**
      * No instantiation allowed
      */
     private AccessController() {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/modules/Module.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/modules/Module.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/modules/Module.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/modules/Module.java Sun Mar  4 10:16:54 2007
@@ -52,26 +52,26 @@
      * @throws AxisFault
      */
     void engageNotify(AxisDescription axisDescription) throws AxisFault;
-    
+
     /**
      * Evalute whether it can support the specified assertion and returns true if the assertion can
-     * be supported. 
-     *  
-     * @param assertion the assertion that the module must decide whether it can support or not. 
+     * be supported.
+     *
+     * @param assertion the assertion that the module must decide whether it can support or not.
      * @return true if the specified assertion can be supported by the module
      */
     public boolean canSupportAssertion(Assertion assertion);
-    
+
     /**
-     * Evaluates specified policy for the specified AxisDescription. It computes the configuration that 
+     * Evaluates specified policy for the specified AxisDescription. It computes the configuration that
      * is appropriate to support the policy and stores it the appropriate description.
-     * 
+     *
      * @param policy the policy that is applicable for the specified AxisDescription
-     * @throws AxisFault if anything goes wrong. 
+     * @throws AxisFault if anything goes wrong.
      */
     public void applyPolicy(Policy policy, AxisDescription axisDescription) throws AxisFault;
-    
-            
+
+
     // shutdown the module
     public void shutdown(ConfigurationContext configurationContext) throws AxisFault;
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/modules/ModulePolicyExtension.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/modules/ModulePolicyExtension.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/modules/ModulePolicyExtension.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/modules/ModulePolicyExtension.java Sun Mar  4 10:16:54 2007
@@ -17,7 +17,6 @@
 package org.apache.axis2.modules;
 
 
-
 public interface ModulePolicyExtension {
 
     public PolicyExtension getPolicyExtension();

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/modules/PolicyExtension.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/modules/PolicyExtension.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/modules/PolicyExtension.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/modules/PolicyExtension.java Sun Mar  4 10:16:54 2007
@@ -23,6 +23,7 @@
 import java.util.List;
 
 public interface PolicyExtension {
-    public void addMethodsToStub(Document document, Element element, QName methodName, List assertions);
+    public void addMethodsToStub(Document document, Element element, QName methodName,
+                                 List assertions);
 
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/namespace/Constants.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/namespace/Constants.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/namespace/Constants.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/namespace/Constants.java Sun Mar  4 10:16:54 2007
@@ -23,25 +23,25 @@
     public static final String AXIS2_NAMESPACE_URI =
             "http://ws.apache.org/namespaces/axis2";
     public static final String AXIS2_NAMESPACE_PREFIX = "axis2";
-    
+
     // Namespace Prefix Constants
     //////////////////////////////////////////////////////////////////////////
-    public static final String NS_PREFIX_SOAP_ENV   = "soapenv";
-    public static final String NS_PREFIX_SOAP_ENC   = "soapenc";
-    public static final String NS_PREFIX_SCHEMA_XSI = "xsi" ;
-    public static final String NS_PREFIX_SCHEMA_XSD = "xsd" ;
-    public static final String NS_PREFIX_WSDL       = "wsdl" ;
-    public static final String NS_PREFIX_WSDL_SOAP  = "wsdlsoap";
-    public static final String NS_PREFIX_XML        = "xml";
-    public static final String NS_PREFIX_XOP        = "xop";
+    public static final String NS_PREFIX_SOAP_ENV = "soapenv";
+    public static final String NS_PREFIX_SOAP_ENC = "soapenc";
+    public static final String NS_PREFIX_SCHEMA_XSI = "xsi";
+    public static final String NS_PREFIX_SCHEMA_XSD = "xsd";
+    public static final String NS_PREFIX_WSDL = "wsdl";
+    public static final String NS_PREFIX_WSDL_SOAP = "wsdlsoap";
+    public static final String NS_PREFIX_XML = "xml";
+    public static final String NS_PREFIX_XOP = "xop";
 
     //
     // SOAP-ENV Namespaces
     //
     public static final String URI_SOAP11_ENV =
-                                "http://schemas.xmlsoap.org/soap/envelope/" ;
+            "http://schemas.xmlsoap.org/soap/envelope/";
     public static final String URI_SOAP12_ENV =
-                                   "http://www.w3.org/2003/05/soap-envelope";
+            "http://www.w3.org/2003/05/soap-envelope";
 
     public static final String URI_LITERAL_ENC = "";
 
@@ -49,50 +49,50 @@
     // SOAP-ENC Namespaces
     //
     public static final String URI_SOAP11_ENC =
-                                "http://schemas.xmlsoap.org/soap/encoding/" ;
+            "http://schemas.xmlsoap.org/soap/encoding/";
     public static final String URI_SOAP12_ENC =
-                                   "http://www.w3.org/2003/05/soap-encoding";
+            "http://www.w3.org/2003/05/soap-encoding";
     public static final String URI_SOAP12_NOENC =
-                     "http://www.w3.org/2003/05/soap-envelope/encoding/none";
+            "http://www.w3.org/2003/05/soap-envelope/encoding/none";
 
     // Misc SOAP Namespaces / URIs
     public static final String URI_SOAP11_NEXT_ACTOR =
-                                     "http://schemas.xmlsoap.org/soap/actor/next" ;
+            "http://schemas.xmlsoap.org/soap/actor/next";
     public static final String URI_SOAP12_NEXT_ROLE =
-                                     "http://www.w3.org/2003/05/soap-envelope/role/next";
+            "http://www.w3.org/2003/05/soap-envelope/role/next";
     /**
      * @deprecated use URI_SOAP12_NEXT_ROLE
      */
     public static final String URI_SOAP12_NEXT_ACTOR = URI_SOAP12_NEXT_ROLE;
 
     public static final String URI_SOAP12_RPC =
-                                     "http://www.w3.org/2003/05/soap-rpc";
+            "http://www.w3.org/2003/05/soap-rpc";
 
     public static final String URI_SOAP12_NONE_ROLE =
-                         "http://www.w3.org/2003/05/soap-envelope/role/none";
+            "http://www.w3.org/2003/05/soap-envelope/role/none";
     public static final String URI_SOAP12_ULTIMATE_ROLE =
-             "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver";
+            "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver";
 
     public static final String URI_SOAP11_HTTP =
-                                     "http://schemas.xmlsoap.org/soap/http";
+            "http://schemas.xmlsoap.org/soap/http";
     public static final String URI_SOAP12_HTTP =
-                                    "http://www.w3.org/2003/05/http";
+            "http://www.w3.org/2003/05/http";
 
     public static final String NS_URI_XMLNS =
-                                       "http://www.w3.org/2000/xmlns/";
+            "http://www.w3.org/2000/xmlns/";
 
     public static final String NS_URI_XML =
-                                       "http://www.w3.org/XML/1998/namespace";
+            "http://www.w3.org/XML/1998/namespace";
 
     //
     // Schema XSD Namespaces
     //
     public static final String URI_1999_SCHEMA_XSD =
-                                          "http://www.w3.org/1999/XMLSchema";
+            "http://www.w3.org/1999/XMLSchema";
     public static final String URI_2000_SCHEMA_XSD =
-                                       "http://www.w3.org/2000/10/XMLSchema";
+            "http://www.w3.org/2000/10/XMLSchema";
     public static final String URI_2001_SCHEMA_XSD =
-                                          "http://www.w3.org/2001/XMLSchema";
+            "http://www.w3.org/2001/XMLSchema";
 
     public static final String URI_DEFAULT_SCHEMA_XSD = URI_2001_SCHEMA_XSD;
 
@@ -100,96 +100,96 @@
     // Schema XSI Namespaces
     //
     public static final String URI_1999_SCHEMA_XSI =
-                                 "http://www.w3.org/1999/XMLSchema-instance";
+            "http://www.w3.org/1999/XMLSchema-instance";
     public static final String URI_2000_SCHEMA_XSI =
-                              "http://www.w3.org/2000/10/XMLSchema-instance";
+            "http://www.w3.org/2000/10/XMLSchema-instance";
     public static final String URI_2001_SCHEMA_XSI =
-                                 "http://www.w3.org/2001/XMLSchema-instance";
+            "http://www.w3.org/2001/XMLSchema-instance";
     public static final String URI_DEFAULT_SCHEMA_XSI = URI_2001_SCHEMA_XSI;
 
     public static final String URI_POLICY =
-                                "http://schemas.xmlsoap.org/ws/2004/09/policy";
+            "http://schemas.xmlsoap.org/ws/2004/09/policy";
     /**
      * WSDL Namespace.
      */
     public static final String NS_URI_WSDL11 =
-                                 "http://schemas.xmlsoap.org/wsdl/";
+            "http://schemas.xmlsoap.org/wsdl/";
 
     public static final String NS_URI_WSDL20 =
-                                 "http://www.w3.org/2004/03/wsdl";
+            "http://www.w3.org/2004/03/wsdl";
 
     //
     // WSDL extensions for SOAP in DIME
     // (http://gotdotnet.com/team/xml_wsspecs/dime/WSDL-Extension-for-DIME.htm)
     //
     public static final String URI_DIME_WSDL =
-                                 "http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/";
+            "http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/";
 
     public static final String URI_DIME_CONTENT =
-                                 "http://schemas.xmlsoap.org/ws/2002/04/content-type/";
+            "http://schemas.xmlsoap.org/ws/2002/04/content-type/";
 
-    public static final String URI_DIME_REFERENCE=
-                                 "http://schemas.xmlsoap.org/ws/2002/04/reference/";
+    public static final String URI_DIME_REFERENCE =
+            "http://schemas.xmlsoap.org/ws/2002/04/reference/";
 
-    public static final String URI_DIME_CLOSED_LAYOUT=
-                                 "http://schemas.xmlsoap.org/ws/2002/04/dime/closed-layout";
+    public static final String URI_DIME_CLOSED_LAYOUT =
+            "http://schemas.xmlsoap.org/ws/2002/04/dime/closed-layout";
 
-    public static final String URI_DIME_OPEN_LAYOUT=
-                                 "http://schemas.xmlsoap.org/ws/2002/04/dime/open-layout";
+    public static final String URI_DIME_OPEN_LAYOUT =
+            "http://schemas.xmlsoap.org/ws/2002/04/dime/open-layout";
 
     // XOP/MTOM
     public static final String URI_XOP_INCLUDE =
-                                 "http://www.w3.org/2004/08/xop/include";
-    public static final String ELEM_XOP_INCLUDE = "Include" ;
+            "http://www.w3.org/2004/08/xop/include";
+    public static final String ELEM_XOP_INCLUDE = "Include";
 
 
     //
     // WSDL SOAP Namespace
     //
     public static final String URI_WSDL11_SOAP =
-                                 "http://schemas.xmlsoap.org/wsdl/soap/";
+            "http://schemas.xmlsoap.org/wsdl/soap/";
     public static final String URI_WSDL12_SOAP =
-                                 "http://schemas.xmlsoap.org/wsdl/soap12/";
+            "http://schemas.xmlsoap.org/wsdl/soap12/";
 
-    public static final String ELEM_ENVELOPE = "Envelope" ;
-    public static final String ELEM_HEADER   = "Header" ;
-    public static final String ELEM_BODY     = "Body" ;
-    public static final String ELEM_FAULT    = "Fault" ;
+    public static final String ELEM_ENVELOPE = "Envelope";
+    public static final String ELEM_HEADER = "Header";
+    public static final String ELEM_BODY = "Body";
+    public static final String ELEM_FAULT = "Fault";
 
     public static final String ELEM_NOTUNDERSTOOD = "NotUnderstood";
-    public static final String ELEM_UPGRADE           = "Upgrade";
+    public static final String ELEM_UPGRADE = "Upgrade";
     public static final String ELEM_SUPPORTEDENVELOPE = "SupportedEnvelope";
 
-    public static final String ELEM_FAULT_CODE   = "faultcode" ;
-    public static final String ELEM_FAULT_STRING = "faultstring" ;
-    public static final String ELEM_FAULT_DETAIL = "detail" ;
-    public static final String ELEM_FAULT_ACTOR  = "faultactor" ;
-
-    public static final String ELEM_FAULT_CODE_SOAP12 = "Code" ;
-    public static final String ELEM_FAULT_VALUE_SOAP12 = "Value" ;
-    public static final String ELEM_FAULT_SUBCODE_SOAP12 = "Subcode" ;
-    public static final String ELEM_FAULT_REASON_SOAP12 = "Reason" ;
-    public static final String ELEM_FAULT_NODE_SOAP12 = "Node" ;
-    public static final String ELEM_FAULT_ROLE_SOAP12 = "Role" ;
-    public static final String ELEM_FAULT_DETAIL_SOAP12 = "Detail" ;
-    public static final String ELEM_TEXT_SOAP12 = "Text" ;
-
-    public static final String ATTR_MUST_UNDERSTAND = "mustUnderstand" ;
-    public static final String ATTR_ENCODING_STYLE  = "encodingStyle" ;
-    public static final String ATTR_ACTOR           = "actor" ;
-    public static final String ATTR_ROLE            = "role" ;
-    public static final String ATTR_RELAY           = "relay" ;
-    public static final String ATTR_ROOT            = "root" ;
-    public static final String ATTR_ID              = "id" ;
-    public static final String ATTR_HREF            = "href" ;
-    public static final String ATTR_REF             = "ref" ;
-    public static final String ATTR_QNAME           = "qname";
-    public static final String ATTR_ARRAY_TYPE      = "arrayType";
-    public static final String ATTR_ITEM_TYPE       = "itemType";
-    public static final String ATTR_ARRAY_SIZE      = "arraySize";
-    public static final String ATTR_OFFSET          = "offset";
-    public static final String ATTR_POSITION        = "position";
-    public static final String ATTR_TYPE            = "type";
+    public static final String ELEM_FAULT_CODE = "faultcode";
+    public static final String ELEM_FAULT_STRING = "faultstring";
+    public static final String ELEM_FAULT_DETAIL = "detail";
+    public static final String ELEM_FAULT_ACTOR = "faultactor";
+
+    public static final String ELEM_FAULT_CODE_SOAP12 = "Code";
+    public static final String ELEM_FAULT_VALUE_SOAP12 = "Value";
+    public static final String ELEM_FAULT_SUBCODE_SOAP12 = "Subcode";
+    public static final String ELEM_FAULT_REASON_SOAP12 = "Reason";
+    public static final String ELEM_FAULT_NODE_SOAP12 = "Node";
+    public static final String ELEM_FAULT_ROLE_SOAP12 = "Role";
+    public static final String ELEM_FAULT_DETAIL_SOAP12 = "Detail";
+    public static final String ELEM_TEXT_SOAP12 = "Text";
+
+    public static final String ATTR_MUST_UNDERSTAND = "mustUnderstand";
+    public static final String ATTR_ENCODING_STYLE = "encodingStyle";
+    public static final String ATTR_ACTOR = "actor";
+    public static final String ATTR_ROLE = "role";
+    public static final String ATTR_RELAY = "relay";
+    public static final String ATTR_ROOT = "root";
+    public static final String ATTR_ID = "id";
+    public static final String ATTR_HREF = "href";
+    public static final String ATTR_REF = "ref";
+    public static final String ATTR_QNAME = "qname";
+    public static final String ATTR_ARRAY_TYPE = "arrayType";
+    public static final String ATTR_ITEM_TYPE = "itemType";
+    public static final String ATTR_ARRAY_SIZE = "arraySize";
+    public static final String ATTR_OFFSET = "offset";
+    public static final String ATTR_POSITION = "position";
+    public static final String ATTR_TYPE = "type";
     public static final String ATTR_HANDLERINFOCHAIN = "handlerInfoChain";
 
     // Fault Codes
@@ -197,32 +197,32 @@
     public static final String FAULT_CLIENT = "Client";
 
     public static final String FAULT_SERVER_GENERAL =
-                                                   "Server.generalException";
+            "Server.generalException";
 
     public static final String FAULT_SERVER_USER =
-                                                   "Server.userException";
+            "Server.userException";
 
     public static final QName FAULT_VERSIONMISMATCH =
-                                  new QName(URI_SOAP11_ENV, "VersionMismatch");
+            new QName(URI_SOAP11_ENV, "VersionMismatch");
 
     public static final QName FAULT_MUSTUNDERSTAND =
-                                  new QName(URI_SOAP11_ENV, "MustUnderstand");
+            new QName(URI_SOAP11_ENV, "MustUnderstand");
 
 
     public static final QName FAULT_SOAP12_MUSTUNDERSTAND =
-                                  new QName(URI_SOAP12_ENV, "MustUnderstand");
+            new QName(URI_SOAP12_ENV, "MustUnderstand");
 
     public static final QName FAULT_SOAP12_VERSIONMISMATCH =
-                                  new QName(URI_SOAP12_ENV, "VersionMismatch");
+            new QName(URI_SOAP12_ENV, "VersionMismatch");
 
     public static final QName FAULT_SOAP12_DATAENCODINGUNKNOWN =
-                                  new QName(URI_SOAP12_ENV, "DataEncodingUnknown");
+            new QName(URI_SOAP12_ENV, "DataEncodingUnknown");
 
     public static final QName FAULT_SOAP12_SENDER =
-                                  new QName(URI_SOAP12_ENV, "Sender");
+            new QName(URI_SOAP12_ENV, "Sender");
 
     public static final QName FAULT_SOAP12_RECEIVER =
-                                  new QName(URI_SOAP12_ENV, "Receiver");
+            new QName(URI_SOAP12_ENV, "Receiver");
 
     // SOAP 1.2 Fault subcodes
     public static final QName FAULT_SUBCODE_BADARGS =
@@ -233,33 +233,33 @@
     // QNames
     //////////////////////////////////////////////////////////////////////////
     public static final QName QNAME_FAULTCODE =
-                                         new QName("", ELEM_FAULT_CODE);
+            new QName("", ELEM_FAULT_CODE);
     public static final QName QNAME_FAULTSTRING =
-                                       new QName("", ELEM_FAULT_STRING);
+            new QName("", ELEM_FAULT_STRING);
     public static final QName QNAME_FAULTACTOR =
-                                        new QName("", ELEM_FAULT_ACTOR);
+            new QName("", ELEM_FAULT_ACTOR);
     public static final QName QNAME_FAULTDETAILS =
-                                         new QName("", ELEM_FAULT_DETAIL);
+            new QName("", ELEM_FAULT_DETAIL);
 
     public static final QName QNAME_FAULTCODE_SOAP12 =
-                                         new QName(URI_SOAP12_ENV, ELEM_FAULT_CODE_SOAP12);
+            new QName(URI_SOAP12_ENV, ELEM_FAULT_CODE_SOAP12);
     public static final QName QNAME_FAULTVALUE_SOAP12 =
-                                         new QName(URI_SOAP12_ENV, ELEM_FAULT_VALUE_SOAP12);
+            new QName(URI_SOAP12_ENV, ELEM_FAULT_VALUE_SOAP12);
     public static final QName QNAME_FAULTSUBCODE_SOAP12 =
-                                         new QName(URI_SOAP12_ENV, ELEM_FAULT_SUBCODE_SOAP12);
+            new QName(URI_SOAP12_ENV, ELEM_FAULT_SUBCODE_SOAP12);
     public static final QName QNAME_FAULTREASON_SOAP12 =
-                                         new QName(URI_SOAP12_ENV, ELEM_FAULT_REASON_SOAP12);
+            new QName(URI_SOAP12_ENV, ELEM_FAULT_REASON_SOAP12);
     public static final QName QNAME_TEXT_SOAP12 =
-                                         new QName(URI_SOAP12_ENV, ELEM_TEXT_SOAP12);
+            new QName(URI_SOAP12_ENV, ELEM_TEXT_SOAP12);
 
     public static final QName QNAME_FAULTNODE_SOAP12 =
-                                         new QName(URI_SOAP12_ENV, ELEM_FAULT_NODE_SOAP12);
+            new QName(URI_SOAP12_ENV, ELEM_FAULT_NODE_SOAP12);
     public static final QName QNAME_FAULTROLE_SOAP12 =
-                                         new QName(URI_SOAP12_ENV, ELEM_FAULT_ROLE_SOAP12);
+            new QName(URI_SOAP12_ENV, ELEM_FAULT_ROLE_SOAP12);
     public static final QName QNAME_FAULTDETAIL_SOAP12 =
-                                         new QName(URI_SOAP12_ENV, ELEM_FAULT_DETAIL_SOAP12);
+            new QName(URI_SOAP12_ENV, ELEM_FAULT_DETAIL_SOAP12);
     public static final QName QNAME_NOTUNDERSTOOD =
-                                         new QName(URI_SOAP12_ENV, ELEM_NOTUNDERSTOOD);
+            new QName(URI_SOAP12_ENV, ELEM_NOTUNDERSTOOD);
 
     // Define qnames for the all of the XSD and SOAP-ENC encodings
     public static final QName XSD_STRING = new QName(URI_DEFAULT_SCHEMA_XSD, "string");
@@ -274,7 +274,8 @@
     public static final QName XSD_DECIMAL = new QName(URI_DEFAULT_SCHEMA_XSD, "decimal");
     public static final QName XSD_BASE64 = new QName(URI_DEFAULT_SCHEMA_XSD, "base64Binary");
     public static final QName XSD_HEXBIN = new QName(URI_DEFAULT_SCHEMA_XSD, "hexBinary");
-    public static final QName XSD_ANYSIMPLETYPE = new QName(URI_DEFAULT_SCHEMA_XSD, "anySimpleType");
+    public static final QName XSD_ANYSIMPLETYPE =
+            new QName(URI_DEFAULT_SCHEMA_XSD, "anySimpleType");
     public static final QName XSD_ANYTYPE = new QName(URI_DEFAULT_SCHEMA_XSD, "anyType");
     public static final QName XSD_ANY = new QName(URI_DEFAULT_SCHEMA_XSD, "any");
     public static final QName AXIS2_NONE = new QName("http://org.apache.axis2", "none");
@@ -285,17 +286,22 @@
     public static final QName XSD_TIMEINSTANT1999 = new QName(URI_1999_SCHEMA_XSD, "timeInstant");
     public static final QName XSD_TIMEINSTANT2000 = new QName(URI_2000_SCHEMA_XSD, "timeInstant");
 
-    public static final QName XSD_NORMALIZEDSTRING = new QName(URI_2001_SCHEMA_XSD, "normalizedString");
+    public static final QName XSD_NORMALIZEDSTRING =
+            new QName(URI_2001_SCHEMA_XSD, "normalizedString");
     public static final QName XSD_TOKEN = new QName(URI_2001_SCHEMA_XSD, "token");
 
     public static final QName XSD_UNSIGNEDLONG = new QName(URI_2001_SCHEMA_XSD, "unsignedLong");
     public static final QName XSD_UNSIGNEDINT = new QName(URI_2001_SCHEMA_XSD, "unsignedInt");
     public static final QName XSD_UNSIGNEDSHORT = new QName(URI_2001_SCHEMA_XSD, "unsignedShort");
     public static final QName XSD_UNSIGNEDBYTE = new QName(URI_2001_SCHEMA_XSD, "unsignedByte");
-    public static final QName XSD_POSITIVEINTEGER = new QName(URI_2001_SCHEMA_XSD, "positiveInteger");
-    public static final QName XSD_NEGATIVEINTEGER = new QName(URI_2001_SCHEMA_XSD, "negativeInteger");
-    public static final QName XSD_NONNEGATIVEINTEGER = new QName(URI_2001_SCHEMA_XSD, "nonNegativeInteger");
-    public static final QName XSD_NONPOSITIVEINTEGER = new QName(URI_2001_SCHEMA_XSD, "nonPositiveInteger");
+    public static final QName XSD_POSITIVEINTEGER =
+            new QName(URI_2001_SCHEMA_XSD, "positiveInteger");
+    public static final QName XSD_NEGATIVEINTEGER =
+            new QName(URI_2001_SCHEMA_XSD, "negativeInteger");
+    public static final QName XSD_NONNEGATIVEINTEGER =
+            new QName(URI_2001_SCHEMA_XSD, "nonNegativeInteger");
+    public static final QName XSD_NONPOSITIVEINTEGER =
+            new QName(URI_2001_SCHEMA_XSD, "nonPositiveInteger");
 
     public static final QName XSD_YEARMONTH = new QName(URI_2001_SCHEMA_XSD, "gYearMonth");
     public static final QName XSD_MONTHDAY = new QName(URI_2001_SCHEMA_XSD, "gMonthDay");
@@ -339,18 +345,21 @@
     public static final QName SOAP_ARRAY_ATTRS12 = new QName(URI_SOAP12_ENC, "arrayAttributes");
     public static final QName SOAP_ARRAY12 = new QName(URI_SOAP12_ENC, "Array");
 
-    public static final QName QNAME_LITERAL_ITEM = new QName(URI_LITERAL_ENC,"item");
-    public static final QName QNAME_RPC_RESULT = new QName(URI_SOAP12_RPC,"result");
+    public static final QName QNAME_LITERAL_ITEM = new QName(URI_LITERAL_ENC, "item");
+    public static final QName QNAME_RPC_RESULT = new QName(URI_SOAP12_RPC, "result");
 
-    public static final String MIME_CT_APPLICATION_OCTETSTREAM     = "application/octet-stream";
-    public static final String MIME_CT_TEXT_PLAIN         = "text/plain";
-    public static final String MIME_CT_IMAGE_JPEG        = "image/jpeg";
-    public static final String MIME_CT_IMAGE_GIF        = "image/gif";
-    public static final String MIME_CT_TEXT_XML            = "text/xml";
-    public static final String MIME_CT_APPLICATION_XML        = "application/xml";
-    public static final String MIME_CT_MULTIPART_PREFIX        = "multipart/";
-    
-    public static final QName BASE_64_CONTENT_QNAME = new QName(URI_2001_SCHEMA_XSD, "base64Binary");
-    public static final QName XMIME_CONTENT_TYPE_QNAME = new QName("http://www.w3.org/2004/06/xmlmime", "contentType");
-    public static final String URI_SECURITYPOLICY = "http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";
+    public static final String MIME_CT_APPLICATION_OCTETSTREAM = "application/octet-stream";
+    public static final String MIME_CT_TEXT_PLAIN = "text/plain";
+    public static final String MIME_CT_IMAGE_JPEG = "image/jpeg";
+    public static final String MIME_CT_IMAGE_GIF = "image/gif";
+    public static final String MIME_CT_TEXT_XML = "text/xml";
+    public static final String MIME_CT_APPLICATION_XML = "application/xml";
+    public static final String MIME_CT_MULTIPART_PREFIX = "multipart/";
+
+    public static final QName BASE_64_CONTENT_QNAME =
+            new QName(URI_2001_SCHEMA_XSD, "base64Binary");
+    public static final QName XMIME_CONTENT_TYPE_QNAME =
+            new QName("http://www.w3.org/2004/06/xmlmime", "contentType");
+    public static final String URI_SECURITYPOLICY =
+            "http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/phaseresolver/PhaseHolder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/phaseresolver/PhaseHolder.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/phaseresolver/PhaseHolder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/phaseresolver/PhaseHolder.java Sun Mar  4 10:16:54 2007
@@ -64,7 +64,7 @@
                 getPhase(phaseName).addHandler(handlerDesc);
             } else {
                 throw new PhaseException(Messages.getMessage(DeploymentErrorMsgs.INVALID_PHASE,
-                        phaseName, handlerDesc.getName()));
+                                                             phaseName, handlerDesc.getName()));
             }
         }
     }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/receivers/AbstractInOutAsyncMessageReceiver.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/receivers/AbstractInOutAsyncMessageReceiver.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/receivers/AbstractInOutAsyncMessageReceiver.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/receivers/AbstractInOutAsyncMessageReceiver.java Sun Mar  4 10:16:54 2007
@@ -46,7 +46,8 @@
                 AxisEngine engine =
                         new AxisEngine(messageCtx.getOperationContext().getServiceContext()
                                 .getConfigurationContext());
-                MessageContext faultContext = MessageContextBuilder.createFaultMessageContext(messageCtx, fault);
+                MessageContext faultContext =
+                        MessageContextBuilder.createFaultMessageContext(messageCtx, fault);
 
                 engine.sendFault(faultContext);
             }
@@ -54,7 +55,8 @@
         Runnable theadedTask = new Runnable() {
             public void run() {
                 try {
-                    MessageContext newmsgCtx = MessageContextBuilder.createOutMessageContext(messageCtx);
+                    MessageContext newmsgCtx =
+                            MessageContextBuilder.createOutMessageContext(messageCtx);
                     newmsgCtx.getOperationContext().addMessageContext(newmsgCtx);
                     ThreadContextDescriptor tc = setThreadContext(messageCtx);
                     try {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/receivers/AbstractMessageReceiver.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/receivers/AbstractMessageReceiver.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/receivers/AbstractMessageReceiver.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/receivers/AbstractMessageReceiver.java Sun Mar  4 10:16:54 2007
@@ -74,10 +74,11 @@
 
 
             if (serviceTCCL.equals(Constants.TCCL_COMPOSITE)) {
-                Thread.currentThread().setContextClassLoader(new MultiParentClassLoader(new URL[]{}, new ClassLoader[]{
-                        msgContext.getAxisService().getClassLoader(),
-                        contextClassLoader,
-                }));
+                Thread.currentThread().setContextClassLoader(
+                        new MultiParentClassLoader(new URL[]{}, new ClassLoader[]{
+                                msgContext.getAxisService().getClassLoader(),
+                                contextClassLoader,
+                        }));
             } else if (serviceTCCL.equals(Constants.TCCL_SERVICE)) {
                 Thread.currentThread().setContextClassLoader(
                         msgContext.getAxisService().getClassLoader()
@@ -116,10 +117,10 @@
                 // Find static getServiceObject() method, call it if there   
                 Method method = serviceObjectMaker.
                         getMethod("getServiceObject",
-                                new Class[]{AxisService.class});
+                                  new Class[]{AxisService.class});
                 if (method != null) {
                     return method.invoke(serviceObjectMaker.newInstance(), new Object[]{service});
-            }
+                }
             }
 
             Parameter implInfoParam = service.getParameter(Constants.SERVICE_CLASS);
@@ -130,7 +131,8 @@
 
                 return implClass.newInstance();
             } else {
-                throw new AxisFault(Messages.getMessage("paramIsNotSpecified", "SERVICE_OBJECT_SUPPLIER"));
+                throw new AxisFault(
+                        Messages.getMessage("paramIsNotSpecified", "SERVICE_OBJECT_SUPPLIER"));
             }
         } catch (Exception e) {
             throw AxisFault.makeFault(e);
@@ -166,7 +168,7 @@
             serviceimpl = makeNewServiceObject(msgContext);
             //Service initialization
             DependencyManager.initServiceClass(serviceimpl,
-                    msgContext.getServiceContext());
+                                               msgContext.getServiceContext());
             serviceContext.setProperty(ServiceContext.SERVICE_OBJECT, serviceimpl);
             return serviceimpl;
         }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/MessageFormatter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/MessageFormatter.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/MessageFormatter.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/MessageFormatter.java Sun Mar  4 10:16:54 2007
@@ -32,14 +32,14 @@
  * service.xml/axis2.xml for a per service based/engine wide configuration.
  * </p>
  * <p/>
- * <messageFormatters> 
- *         <messageFormatter contentType="application/soap+xml"
- *             class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+ * <messageFormatters>
+ * <messageFormatter contentType="application/soap+xml"
+ * class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
  * </messageFormatters>
  * </p>
  */
 public interface MessageFormatter {
-    
+
     /**
      * @return a byte array of the message formatted according to the given
      *         message format.
@@ -53,13 +53,13 @@
      * <p/>
      * Preserve flag can be used to preserve the envelope for later use. This is
      * usefull when implementing authentication machnisms like NTLM.
-     * 
+     *
      * @param outputStream
-     * @param preserve :
-     *            do not consume the OM when this is set..
+     * @param preserve     :
+     *                     do not consume the OM when this is set..
      */
     public void writeTo(MessageContext messageContext, OMOutputFormat format,
-            OutputStream outputStream, boolean preserve) throws AxisFault;
+                        OutputStream outputStream, boolean preserve) throws AxisFault;
 
     /**
      * Different message formats can set their own content types
@@ -70,19 +70,19 @@
      * @param soapAction
      */
     public String getContentType(MessageContext messageContext, OMOutputFormat format,
-            String soapAction);
+                                 String soapAction);
 
     /**
      * Some message formats may want to alter the target url.
-     * 
+     *
      * @return the target URL
      */
     public URL getTargetAddress(MessageContext messageContext, OMOutputFormat format,
-            URL targetURL) throws AxisFault;
+                                URL targetURL) throws AxisFault;
 
     /**
      * @return this only if you want set a transport header for SOAP Action
      */
     public String formatSOAPAction(MessageContext messageContext, OMOutputFormat format,
-            String soapAction);
+                                   String soapAction);
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/RequestResponseTransport.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/RequestResponseTransport.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/RequestResponseTransport.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/RequestResponseTransport.java Sun Mar  4 10:16:54 2007
@@ -26,95 +26,98 @@
  * completed, nor does it allow for processing to be paused and resumed
  * on a separate thread without having a response be sent back.  This interface
  * enables both of those scenarios by allowing the transport to expose
- * controls to the rest of the engine via a callback.     
+ * controls to the rest of the engine via a callback.
  */
 public interface RequestResponseTransport {
-    
-  /*This is the name of the property that is to be stored on the
+
+    /*This is the name of the property that is to be stored on the
     MessageContext*/
-  public static final String TRANSPORT_CONTROL
-    = "RequestResponseTransportControl";
-  
-  /**
-   * If this property is set to true in a message transport will call the awaitResponse method
-   * of the RequestResponseTransport instead of returning. The value should be a Boolean object.
-   */
-  public static final String HOLD_RESPONSE = "HoldResponse";
-
-  /**
-   * Notify the transport that a message should be acknowledged at this time.
-   * 
-   * @param msgContext
-   * @throws AxisFault
-   */
-  public void acknowledgeMessage(MessageContext msgContext) throws AxisFault;
-  
-  /**
-   * Pause execution and wait for a response message to be ready.  This will
-   * typically be called by the transport after a message has been paused and
-   * will cause the transport to block until a response message is ready to be
-   * returned.  This is required to enable RM for in-out MEPs over a
-   * request/response transport; without it the message would be paused and the
-   * transport would simply ack the request.
-   *  
-   * @throws InterruptedException
-   */
-  public void awaitResponse() throws InterruptedException;
-  
-  /**
-   * Signal that a response has be created and is ready for transmission.  This
-   * should release anyone who is blocked on a awaitResponse().
-   */
-  public void signalResponseReady();
-  
-  /**
-   * This gives the current status of an RequestResponseTransport object.  
+    public static final String TRANSPORT_CONTROL
+            = "RequestResponseTransportControl";
+
+    /**
+     * If this property is set to true in a message transport will call the awaitResponse method
+     * of the RequestResponseTransport instead of returning. The value should be a Boolean object.
+     */
+    public static final String HOLD_RESPONSE = "HoldResponse";
+
+    /**
+     * Notify the transport that a message should be acknowledged at this time.
      *
-   * @return
-   */
-  public RequestResponseTransportStatus getStatus ();
-  
-  /**
-   * Used to give the current status of the RequestResponseTransport object.
-   */
-  public class RequestResponseTransportStatus {
-      /**
-       * Transport is in its initial stage.
-       */
-      public static RequestResponseTransportStatus INITIAL = new RequestResponseTransportStatus (1);
-      
-      /**
-       * awaitResponse has been called.
-       */
-      public static RequestResponseTransportStatus WAITING = new RequestResponseTransportStatus (2);
-      
-      /**
-       * 'signalResponseReady' has been called.
-       */
-      public static RequestResponseTransportStatus SIGNALLED = new RequestResponseTransportStatus (3);
-      
-      private int value;
-      
-      private RequestResponseTransportStatus (int value) {
-          this.value = value;
-      }
-      
+     * @param msgContext
+     * @throws AxisFault
+     */
+    public void acknowledgeMessage(MessageContext msgContext) throws AxisFault;
+
+    /**
+     * Pause execution and wait for a response message to be ready.  This will
+     * typically be called by the transport after a message has been paused and
+     * will cause the transport to block until a response message is ready to be
+     * returned.  This is required to enable RM for in-out MEPs over a
+     * request/response transport; without it the message would be paused and the
+     * transport would simply ack the request.
+     *
+     * @throws InterruptedException
+     */
+    public void awaitResponse() throws InterruptedException;
+
+    /**
+     * Signal that a response has be created and is ready for transmission.  This
+     * should release anyone who is blocked on a awaitResponse().
+     */
+    public void signalResponseReady();
+
+    /**
+     * This gives the current status of an RequestResponseTransport object.
+     *
+     * @return
+     */
+    public RequestResponseTransportStatus getStatus();
+
+    /**
+     * Used to give the current status of the RequestResponseTransport object.
+     */
+    public class RequestResponseTransportStatus {
+        /**
+         * Transport is in its initial stage.
+         */
+        public static RequestResponseTransportStatus INITIAL =
+                new RequestResponseTransportStatus(1);
+
+        /**
+         * awaitResponse has been called.
+         */
+        public static RequestResponseTransportStatus WAITING =
+                new RequestResponseTransportStatus(2);
+
+        /**
+         * 'signalResponseReady' has been called.
+         */
+        public static RequestResponseTransportStatus SIGNALLED =
+                new RequestResponseTransportStatus(3);
+
+        private int value;
+
+        private RequestResponseTransportStatus(int value) {
+            this.value = value;
+        }
+
         public int hashCode() {
-        return value;
-      }
-      
-      public boolean equals(Object obj) {
-        if( !(obj instanceof RequestResponseTransportStatus) ) {
-            return false;
+            return value;
+        }
+
+        public boolean equals(Object obj) {
+            if (!(obj instanceof RequestResponseTransportStatus)) {
+                return false;
+            }
+            final RequestResponseTransportStatus instance = (RequestResponseTransportStatus) obj;
+            return (value == instance.value);
+        }
+
+        public String toString() {
+            return Integer.toString(value);
         }
-        final RequestResponseTransportStatus instance = (RequestResponseTransportStatus)obj;
-        return (value==instance.value);
-      }
-      
-      public String toString() {
-          return Integer.toString(value);
-      }
-      
-  }
-  
+
+    }
+
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/SimpleAxis2Server.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/SimpleAxis2Server.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/SimpleAxis2Server.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/SimpleAxis2Server.java Sun Mar  4 10:16:54 2007
@@ -37,7 +37,7 @@
     int port = -1;
 
     public static int DEFAULT_PORT = 8080;
-    
+
 
     /**
      * @param args
@@ -55,12 +55,12 @@
                         .equalsIgnoreCase(optionType));
             }
         });
-        
+
         if ((invalidOptionsList.size() > 0) || (args.length > 4)) {
             printUsage();
             return;
         }
-        
+
         Map optionsMap = optionsParser.getAllOptions();
 
         CommandLineOption repoOption = (CommandLineOption) optionsMap
@@ -80,22 +80,23 @@
                     .println("[SimpleAxisServer] Using the Axis2 Configuration File"
                             + new File(confLocation).getAbsolutePath());
         }
-        
+
         try {
             ConfigurationContext configctx = ConfigurationContextFactory
                     .createConfigurationContextFromFileSystem(repoLocation,
-                            confLocation);
-            ListenerManager listenerManager =  new ListenerManager();
-                listenerManager.init(configctx);
+                                                              confLocation);
+            ListenerManager listenerManager = new ListenerManager();
+            listenerManager.init(configctx);
             listenerManager.start();
             log.info("[SimpleAxisServer] Started");
         } catch (Throwable t) {
             log.fatal("[SimpleAxisServer] Shutting down. Error starting SimpleAxisServer", t);
         }
     }
-    
+
     public static void printUsage() {
-        System.out.println("Usage: SimpleAxisServer -repo <repository>  -conf <axis2 configuration file>");
+        System.out.println(
+                "Usage: SimpleAxisServer -repo <repository>  -conf <axis2 configuration file>");
         System.out.println();
         System.exit(1);
     }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportListener.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportListener.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportListener.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportListener.java Sun Mar  4 10:16:54 2007
@@ -30,7 +30,7 @@
 public interface TransportListener {
 
     String PARAM_PORT = "port";
-    String HOST_ADDRESS="hostname";
+    String HOST_ADDRESS = "hostname";
 
     void init(ConfigurationContext axisConf, TransportInDescription transprtIn)
             throws AxisFault;

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportSender.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportSender.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportSender.java Sun Mar  4 10:16:54 2007
@@ -24,7 +24,7 @@
 import org.apache.axis2.engine.Handler;
 
 /**
- * TransportSender sends the SOAP Message to other SOAP nodes. A TransportSender is responsible for 
+ * TransportSender sends the SOAP Message to other SOAP nodes. A TransportSender is responsible for
  * writing the SOAP Message to the wire. Out flow must be terminated end with a TransportSender
  */
 public interface TransportSender extends Handler {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java Sun Mar  4 10:16:54 2007
@@ -19,20 +19,17 @@
 
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMException;
-import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMOutputFormat;
 import org.apache.axiom.om.impl.builder.StAXBuilder;
 import org.apache.axiom.soap.SOAP11Constants;
 import org.apache.axiom.soap.SOAP12Constants;
-import org.apache.axiom.soap.SOAPConstants;
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPFactory;
-import org.apache.axiom.soap.SOAPProcessingException;
 import org.apache.axiom.soap.impl.llom.soap11.SOAP11Factory;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
-import org.apache.axis2.builder.BuilderUtil;
 import org.apache.axis2.builder.Builder;
+import org.apache.axis2.builder.BuilderUtil;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.Parameter;
 import org.apache.axis2.i18n.Messages;
@@ -51,48 +48,48 @@
 public class TransportUtils {
 
     private static final Log log = LogFactory.getLog(TransportUtils.class);
-    
+
     public static SOAPEnvelope createSOAPMessage(MessageContext msgContext) throws AxisFault {
         try {
             InputStream inStream = (InputStream) msgContext
                     .getProperty(MessageContext.TRANSPORT_IN);
             msgContext.setProperty(MessageContext.TRANSPORT_IN, null);
 
-			// this inputstram is set by the TransportSender represents a two
-			// way transport or a Transport Recevier
-			if (inStream == null) {
-				throw new AxisFault(Messages.getMessage("inputstreamNull"));
-			}
-
-			String contentType = (String) msgContext
-					.getProperty(Constants.Configuration.CONTENT_TYPE);
-
-			// get the type of char encoding
-			String charSetEnc = (String) msgContext
-					.getProperty(Constants.Configuration.CHARACTER_SET_ENCODING);
-			if (charSetEnc == null && contentType != null) {
-				charSetEnc = BuilderUtil.getCharSetEncoding(contentType);
-			} else if (charSetEnc == null) {
-				charSetEnc = MessageContext.DEFAULT_CHAR_SET_ENCODING;
-			}
-			msgContext.setProperty(Constants.Configuration.CHARACTER_SET_ENCODING, charSetEnc);
-
-			return createSOAPMessage(msgContext, inStream, contentType);
-		} catch (AxisFault e) {
-			throw e;
-		} catch (OMException e) {
-			throw new AxisFault(e);
-		} catch (XMLStreamException e) {
-			throw new AxisFault(e);
-		} catch (FactoryConfigurationError e) {
-			throw new AxisFault(e);
-		}
-	}
+            // this inputstram is set by the TransportSender represents a two
+            // way transport or a Transport Recevier
+            if (inStream == null) {
+                throw new AxisFault(Messages.getMessage("inputstreamNull"));
+            }
+
+            String contentType = (String) msgContext
+                    .getProperty(Constants.Configuration.CONTENT_TYPE);
+
+            // get the type of char encoding
+            String charSetEnc = (String) msgContext
+                    .getProperty(Constants.Configuration.CHARACTER_SET_ENCODING);
+            if (charSetEnc == null && contentType != null) {
+                charSetEnc = BuilderUtil.getCharSetEncoding(contentType);
+            } else if (charSetEnc == null) {
+                charSetEnc = MessageContext.DEFAULT_CHAR_SET_ENCODING;
+            }
+            msgContext.setProperty(Constants.Configuration.CHARACTER_SET_ENCODING, charSetEnc);
+
+            return createSOAPMessage(msgContext, inStream, contentType);
+        } catch (AxisFault e) {
+            throw e;
+        } catch (OMException e) {
+            throw new AxisFault(e);
+        } catch (XMLStreamException e) {
+            throw new AxisFault(e);
+        } catch (FactoryConfigurationError e) {
+            throw new AxisFault(e);
+        }
+    }
 
-	/**
+    /**
      * Objective of this method is to capture the SOAPEnvelope creation logic
      * and make it a common for all the transports and to in/out flows.
-     * 
+     *
      * @param msgContext
      * @param inStream
      * @param contentType
@@ -102,54 +99,55 @@
      * @throws XMLStreamException
      * @throws FactoryConfigurationError
      */
-	public static SOAPEnvelope createSOAPMessage(MessageContext msgContext, InputStream inStream,
-			String contentType) throws AxisFault, OMException, XMLStreamException,
-			FactoryConfigurationError {
-		OMElement documentElement = null;
-		String charsetEncoding = null;
-		if (contentType != null) {
-			String type;
-			int index = contentType.indexOf(';');
-			if (index > 0) {
-				type = contentType.substring(0, index);
-			} else {
-				type = contentType;
-			}
-			Builder builder = BuilderUtil.getBuilderFromSelector(type, msgContext);
-			if (builder != null) {
-				documentElement = builder.processDocument(inStream, contentType, msgContext);
-			}
-		}
-		if (documentElement == null) {
+    public static SOAPEnvelope createSOAPMessage(MessageContext msgContext, InputStream inStream,
+                                                 String contentType)
+            throws AxisFault, OMException, XMLStreamException,
+            FactoryConfigurationError {
+        OMElement documentElement = null;
+        String charsetEncoding = null;
+        if (contentType != null) {
+            String type;
+            int index = contentType.indexOf(';');
+            if (index > 0) {
+                type = contentType.substring(0, index);
+            } else {
+                type = contentType;
+            }
+            Builder builder = BuilderUtil.getBuilderFromSelector(type, msgContext);
+            if (builder != null) {
+                documentElement = builder.processDocument(inStream, contentType, msgContext);
+            }
+        }
+        if (documentElement == null) {
             if (msgContext.isDoingREST()) {
                 StAXBuilder builder = BuilderUtil.getPOXBuilder(inStream, charsetEncoding);
                 documentElement = builder.getDocumentElement();
             } else {
-            // FIXME making soap defualt for the moment..might effect the
-			// performance
-			String charSetEnc = (String) msgContext
-					.getProperty(Constants.Configuration.CHARACTER_SET_ENCODING);
-			StAXBuilder builder = BuilderUtil.getSOAPBuilder(inStream, charSetEnc);
-			documentElement = builder.getDocumentElement();
-			charsetEncoding = builder.getDocument().getCharsetEncoding();
+                // FIXME making soap defualt for the moment..might effect the
+                // performance
+                String charSetEnc = (String) msgContext
+                        .getProperty(Constants.Configuration.CHARACTER_SET_ENCODING);
+                StAXBuilder builder = BuilderUtil.getSOAPBuilder(inStream, charSetEnc);
+                documentElement = builder.getDocumentElement();
+                charsetEncoding = builder.getDocument().getCharsetEncoding();
             }
         }
 
-		SOAPEnvelope envelope;
-		// Check whether we have received a SOAPEnvelope or not
-		if (documentElement instanceof SOAPEnvelope) {
-			envelope = (SOAPEnvelope) documentElement;
-		} else {
-			// If it is not a SOAPEnvelope we wrap that with a fake
-			// SOAPEnvelope.
-			SOAPFactory soapFactory = new SOAP11Factory();
-			envelope = soapFactory.getDefaultEnvelope();
-			envelope.getBody().addChild(documentElement);
-		}                                                                                                                      
+        SOAPEnvelope envelope;
+        // Check whether we have received a SOAPEnvelope or not
+        if (documentElement instanceof SOAPEnvelope) {
+            envelope = (SOAPEnvelope) documentElement;
+        } else {
+            // If it is not a SOAPEnvelope we wrap that with a fake
+            // SOAPEnvelope.
+            SOAPFactory soapFactory = new SOAP11Factory();
+            envelope = soapFactory.getDefaultEnvelope();
+            envelope.getBody().addChild(documentElement);
+        }
         return envelope;
     }
 
- /**
+    /**
      * Extracts and returns the character set encoding from the
      * Content-type header
      * Example:
@@ -179,13 +177,13 @@
         }
 
         // There might be "" around the value - if so remove them
-        if(value.indexOf('\"')!=-1){
+        if (value.indexOf('\"') != -1) {
             value = value.replaceAll("\"", "");
         }
 
         return value.trim();
     }
-    
+
     public static void writeMessage(MessageContext msgContext, OutputStream out) throws AxisFault {
         SOAPEnvelope envelope = msgContext.getEnvelope();
         OMElement outputMessage = envelope;
@@ -200,7 +198,8 @@
 
                 // Pick the char set encoding from the msgContext
                 String charSetEnc =
-                        (String) msgContext.getProperty(Constants.Configuration.CHARACTER_SET_ENCODING);
+                        (String) msgContext
+                                .getProperty(Constants.Configuration.CHARACTER_SET_ENCODING);
 
                 format.setDoOptimize(false);
                 format.setDoingSWA(false);
@@ -214,7 +213,7 @@
             throw new AxisFault(Messages.getMessage("outMessageNull"));
         }
     }
-    
+
     /**
      * Initial work for a builder selector which selects the builder for a given message format based on the the content type of the recieved message.
      * content-type to builder mapping can be specified through the Axis2.xml.
@@ -223,15 +222,15 @@
      * @return the builder registered against the given content-type
      * @throws AxisFault
      */
-    public static MessageFormatter getMessageFormatter(MessageContext msgContext) 
-                    throws AxisFault {
+    public static MessageFormatter getMessageFormatter(MessageContext msgContext)
+            throws AxisFault {
         MessageFormatter messageFormatter = null;
         String messageFormatString = getMessageFormatterProperty(msgContext);
         if (messageFormatString != null) {
             messageFormatter = msgContext.getConfigurationContext()
                     .getAxisConfiguration().getMessageFormatter(messageFormatString);
-            
-            }
+
+        }
         if (messageFormatter == null) {
 
             // If we are doing rest better default to Application/xml formatter
@@ -245,85 +244,89 @@
         }
         return messageFormatter;
     }
-    
-    
+
+
     /**
-     * @param contentType The contentType of the incoming message.  It may be null
+     * @param contentType          The contentType of the incoming message.  It may be null
      * @param defaultSOAPNamespace Usually set the version that is expected.  This a fallback if the contentType is unavailable or
-     * does not match our expectations
-     * @return null or the soap namespace.  A null indicates that the message will be interpretted as a non-SOAP (i.e. REST) message 
+     *                             does not match our expectations
+     * @return null or the soap namespace.  A null indicates that the message will be interpretted as a non-SOAP (i.e. REST) message
      */
-   private static String getSOAPNamespaceFromContentType(String contentType, String defaultSOAPNamespace) {
-         
-         String returnNS = defaultSOAPNamespace;
-         // Discriminate using the content Type
-         if (contentType != null) {
-             
-             /*
-              * SOAP11 content-type is "text/xml"
-              * SOAP12 content-type is "application/soap+xml"
-              * 
-              * What about other content-types?
-              * 
-              * TODO: I'm not fully convinced this method is complete, given the media types
-              * listed in HTTPConstants.  Should we assume all application/* is SOAP12?
-              * Should we assume all text/* is SOAP11?
-              * 
-              * So, we'll follow this pattern:
-              * 1)  find the content-type main setting
-              * 2)  if (1) not understood, find the "type=" param
-              * Thilina: I merged (1) & (2)
-              */
-             
-             if (JavaUtils.indexOfIgnoreCase(contentType,SOAP12Constants.SOAP_12_CONTENT_TYPE) > -1) {
-                 returnNS = SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI;
-             }
-             // search for "type=text/xml"
-             else if (JavaUtils.indexOfIgnoreCase(contentType,SOAP11Constants.SOAP_11_CONTENT_TYPE) > -1) {
-                 returnNS = SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI;
-             }
-         }
-         
-         if (returnNS == null) {
-             if (log.isDebugEnabled()) {
-                 log.debug("No content-type or \"type=\" parameter was found in the content-type " +
-                         "header and no default was specified, thus defaulting to SOAP 1.1.");
-             }
-             returnNS = SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI;
-         }
-         
-         if (log.isDebugEnabled()) {
-             log.debug("content-type: " + contentType);
-             log.debug("defaultSOAPNamespace: " + defaultSOAPNamespace);
-             log.debug("Returned namespace: " + returnNS);
-         }
-         return returnNS;
-         
-       }
-
-   public static void processContentTypeForAction(String contentType, MessageContext msgContext) {
-       //Check for action header and set it in as soapAction in MessageContext
-       int index = contentType.indexOf("action");
-       if (index > -1) {
-           String transientString = contentType.substring(index, contentType.length());
-           int equal = transientString.indexOf("=");
-           int firstSemiColon = transientString.indexOf(";");
-           String soapAction; // This will contain "" in the string
-           if (firstSemiColon > -1) {
-               soapAction = transientString.substring(equal + 1, firstSemiColon);
-           } else {
-               soapAction = transientString.substring(equal + 1, transientString.length());
-           }
-           if ((soapAction != null) && soapAction.startsWith("\"")
-               && soapAction.endsWith("\"")) {
-               soapAction = soapAction
-                       .substring(1, soapAction.length() - 1);
-           }
-           msgContext.setSoapAction(soapAction);
-       }
-   }
+    private static String getSOAPNamespaceFromContentType(String contentType,
+                                                          String defaultSOAPNamespace) {
+
+        String returnNS = defaultSOAPNamespace;
+        // Discriminate using the content Type
+        if (contentType != null) {
+
+            /*
+            * SOAP11 content-type is "text/xml"
+            * SOAP12 content-type is "application/soap+xml"
+            *
+            * What about other content-types?
+            *
+            * TODO: I'm not fully convinced this method is complete, given the media types
+            * listed in HTTPConstants.  Should we assume all application/* is SOAP12?
+            * Should we assume all text/* is SOAP11?
+            *
+            * So, we'll follow this pattern:
+            * 1)  find the content-type main setting
+            * 2)  if (1) not understood, find the "type=" param
+            * Thilina: I merged (1) & (2)
+            */
+
+            if (JavaUtils.indexOfIgnoreCase(contentType, SOAP12Constants.SOAP_12_CONTENT_TYPE) > -1)
+            {
+                returnNS = SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI;
+            }
+            // search for "type=text/xml"
+            else
+            if (JavaUtils.indexOfIgnoreCase(contentType, SOAP11Constants.SOAP_11_CONTENT_TYPE) > -1)
+            {
+                returnNS = SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI;
+            }
+        }
+
+        if (returnNS == null) {
+            if (log.isDebugEnabled()) {
+                log.debug("No content-type or \"type=\" parameter was found in the content-type " +
+                        "header and no default was specified, thus defaulting to SOAP 1.1.");
+            }
+            returnNS = SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI;
+        }
+
+        if (log.isDebugEnabled()) {
+            log.debug("content-type: " + contentType);
+            log.debug("defaultSOAPNamespace: " + defaultSOAPNamespace);
+            log.debug("Returned namespace: " + returnNS);
+        }
+        return returnNS;
+
+    }
+
+    public static void processContentTypeForAction(String contentType, MessageContext msgContext) {
+        //Check for action header and set it in as soapAction in MessageContext
+        int index = contentType.indexOf("action");
+        if (index > -1) {
+            String transientString = contentType.substring(index, contentType.length());
+            int equal = transientString.indexOf("=");
+            int firstSemiColon = transientString.indexOf(";");
+            String soapAction; // This will contain "" in the string
+            if (firstSemiColon > -1) {
+                soapAction = transientString.substring(equal + 1, firstSemiColon);
+            } else {
+                soapAction = transientString.substring(equal + 1, transientString.length());
+            }
+            if ((soapAction != null) && soapAction.startsWith("\"")
+                    && soapAction.endsWith("\"")) {
+                soapAction = soapAction
+                        .substring(1, soapAction.length() - 1);
+            }
+            msgContext.setSoapAction(soapAction);
+        }
+    }
+
 
-    
     private static String getMessageFormatterProperty(MessageContext msgContext) {
         String messageFormatterProperty = null;
         Object property = msgContext

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AbstractAgent.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AbstractAgent.java?view=diff&rev=514453&r1=514452&r2=514453
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AbstractAgent.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AbstractAgent.java Sun Mar  4 10:16:54 2007
@@ -38,112 +38,118 @@
  * is the part of the request uri past last /.
  */
 public class AbstractAgent {
-  protected static final String DEFAULT_INDEX_JSP = "index.jsp";
+    protected static final String DEFAULT_INDEX_JSP = "index.jsp";
 
-  private static final String METHOD_PREFIX = "process";
+    private static final String METHOD_PREFIX = "process";
     private static final Log log = LogFactory.getLog(AbstractAgent.class);
 
-  protected transient Map operationCache = new HashMap();
-  protected transient ConfigurationContext configContext;
+    protected transient Map operationCache = new HashMap();
+    protected transient ConfigurationContext configContext;
 
-  public AbstractAgent(ConfigurationContext aConfigContext) {
-    configContext = aConfigContext;
-    preloadMethods();
-  }
-
-  public void handle(HttpServletRequest httpServletRequest,
-                     HttpServletResponse httpServletResponse)
-    throws IOException, ServletException {
-
-
-    String requestURI = httpServletRequest.getRequestURI();
-
-    String operation;
-    int i = requestURI.lastIndexOf('/');
-    if (i < 0) {
-      processUnknown(httpServletRequest, httpServletResponse);
-      return;
-    } else if (i == requestURI.length() - 1) {
-      processIndex(httpServletRequest, httpServletResponse);
-      return;
-    } else {
-      operation = requestURI.substring(i + 1);
-    }
-
-
-    Method method = (Method) operationCache.get(operation.toLowerCase());
-    if (method != null) {
-      try {
-        method.invoke(this, new Object[]{httpServletRequest, httpServletResponse});
-      } catch (Exception e) {
-        log.warn("Error dispatching request " + requestURI, e);
-        httpServletResponse.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
-      }
-    } else {
-      processUnknown(httpServletRequest, httpServletResponse);
-    }
-  }
-
-  /**
-   * Callback method for index page. Forwards to {@link DEFAULT_INDEX_JSP} by default.
-   *
-   * @param httpServletRequest The incoming request.
-   * @param httpServletResponse The outgoing response.
-   */
-  protected void processIndex(HttpServletRequest httpServletRequest,
-                              HttpServletResponse httpServletResponse) throws IOException, ServletException {
-    renderView(DEFAULT_INDEX_JSP, httpServletRequest, httpServletResponse);
-  }
-
-  /**
-   * Callback method for unknown/unsupported requests. Returns HTTP Status 404 by default.
-   *
-   * @param httpServletRequest The incoming request.
-   * @param httpServletResponse The outgoing response.
-   */
-
-  protected void processUnknown(HttpServletRequest httpServletRequest,
-                                HttpServletResponse httpServletResponse) throws IOException, ServletException {
-    httpServletResponse.sendError(HttpServletResponse.SC_NOT_FOUND, httpServletRequest.getRequestURI());
-  }
-
-
-  protected void renderView(String jspName,
-                            HttpServletRequest httpServletRequest,
-                            HttpServletResponse httpServletResponse) throws IOException, ServletException {
-    httpServletRequest.getRequestDispatcher(Constants.AXIS_WEB_CONTENT_ROOT + jspName).include(httpServletRequest, httpServletResponse);
-
-  }
-
-  private void preloadMethods() {
-    Class clazz = getClass();
-    while (clazz != null && !clazz.equals(Object.class)) {
-      examineMethods(clazz.getDeclaredMethods());
-      clazz = clazz.getSuperclass();
-    }
-  }
-
-  private void examineMethods(Method[] aDeclaredMethods) {
-    for (int i = 0; i < aDeclaredMethods.length; i++) {
-      Method method = aDeclaredMethods[i];
-
-      Class[] parameterTypes = method.getParameterTypes();
-      if (
-        (Modifier.isProtected(method.getModifiers()) || Modifier.isPublic(method.getModifiers())) &&
-        method.getName().startsWith(METHOD_PREFIX) &&
-        parameterTypes.length == 2 &&
-        parameterTypes[0].equals(HttpServletRequest.class) &&
-        parameterTypes[1].equals(HttpServletResponse.class)) {
-
-        String key = method.getName().substring(METHOD_PREFIX.length()).toLowerCase();
-
-        // ensure we don't overwrite existing method with superclass method
-        if (!operationCache.containsKey(key)) {
-          operationCache.put(key, method);
+    public AbstractAgent(ConfigurationContext aConfigContext) {
+        configContext = aConfigContext;
+        preloadMethods();
+    }
+
+    public void handle(HttpServletRequest httpServletRequest,
+                       HttpServletResponse httpServletResponse)
+            throws IOException, ServletException {
+
+
+        String requestURI = httpServletRequest.getRequestURI();
+
+        String operation;
+        int i = requestURI.lastIndexOf('/');
+        if (i < 0) {
+            processUnknown(httpServletRequest, httpServletResponse);
+            return;
+        } else if (i == requestURI.length() - 1) {
+            processIndex(httpServletRequest, httpServletResponse);
+            return;
+        } else {
+            operation = requestURI.substring(i + 1);
+        }
+
+
+        Method method = (Method) operationCache.get(operation.toLowerCase());
+        if (method != null) {
+            try {
+                method.invoke(this, new Object[]{httpServletRequest, httpServletResponse});
+            } catch (Exception e) {
+                log.warn("Error dispatching request " + requestURI, e);
+                httpServletResponse.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+            }
+        } else {
+            processUnknown(httpServletRequest, httpServletResponse);
+        }
+    }
+
+    /**
+     * Callback method for index page. Forwards to {@link DEFAULT_INDEX_JSP} by default.
+     *
+     * @param httpServletRequest  The incoming request.
+     * @param httpServletResponse The outgoing response.
+     */
+    protected void processIndex(HttpServletRequest httpServletRequest,
+                                HttpServletResponse httpServletResponse)
+            throws IOException, ServletException {
+        renderView(DEFAULT_INDEX_JSP, httpServletRequest, httpServletResponse);
+    }
+
+    /**
+     * Callback method for unknown/unsupported requests. Returns HTTP Status 404 by default.
+     *
+     * @param httpServletRequest  The incoming request.
+     * @param httpServletResponse The outgoing response.
+     */
+
+    protected void processUnknown(HttpServletRequest httpServletRequest,
+                                  HttpServletResponse httpServletResponse)
+            throws IOException, ServletException {
+        httpServletResponse
+                .sendError(HttpServletResponse.SC_NOT_FOUND, httpServletRequest.getRequestURI());
+    }
+
+
+    protected void renderView(String jspName,
+                              HttpServletRequest httpServletRequest,
+                              HttpServletResponse httpServletResponse)
+            throws IOException, ServletException {
+        httpServletRequest.getRequestDispatcher(Constants.AXIS_WEB_CONTENT_ROOT + jspName)
+                .include(httpServletRequest, httpServletResponse);
+
+    }
+
+    private void preloadMethods() {
+        Class clazz = getClass();
+        while (clazz != null && !clazz.equals(Object.class)) {
+            examineMethods(clazz.getDeclaredMethods());
+            clazz = clazz.getSuperclass();
+        }
+    }
+
+    private void examineMethods(Method[] aDeclaredMethods) {
+        for (int i = 0; i < aDeclaredMethods.length; i++) {
+            Method method = aDeclaredMethods[i];
+
+            Class[] parameterTypes = method.getParameterTypes();
+            if (
+                    (Modifier.isProtected(method.getModifiers()) ||
+                            Modifier.isPublic(method.getModifiers())) &&
+                            method.getName().startsWith(METHOD_PREFIX) &&
+                            parameterTypes.length == 2 &&
+                            parameterTypes[0].equals(HttpServletRequest.class) &&
+                            parameterTypes[1].equals(HttpServletResponse.class)) {
+
+                String key = method.getName().substring(METHOD_PREFIX.length()).toLowerCase();
+
+                // ensure we don't overwrite existing method with superclass method
+                if (!operationCache.containsKey(key)) {
+                    operationCache.put(key, method);
+                }
+            }
         }
-      }
     }
-  }
 
     protected void populateSessionInformation(HttpServletRequest req) {
         HashMap services = configContext.getAxisConfiguration().getServices();



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org