axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r467781 - in /webservices/axis2/trunk/java: etc/ modules/addressing/src/org/apache/axis2/handlers/addressing/ modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleB/org/apache/axis2/soap12testing/handlers/ modules/integration/te...
Date Wed, 25 Oct 2006 22:03:12 GMT
Author: nagy
Date: Wed Oct 25 15:03:10 2006
New Revision: 467781

URL: http://svn.apache.org/viewvc?view=rev&rev=467781
Log:
SANDESHA2-32
Fix for a race condition caused by a handler pausing a message and another thread resuming it before the call stack has unwound.  All handlers must now return an InvocationProcessingInstruction to indicate how processing should continue.  (This is a port of the change that was committed into 1.1 under r467761.)


Added:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/InvocationProcessingInstruction.java
Modified:
    webservices/axis2/trunk/java/etc/project.properties
    webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java
    webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
    webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingWSDLValidationHandler.java
    webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleB/org/apache/axis2/soap12testing/handlers/SOAP12InFlowHandlerDefaultB.java
    webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleB/org/apache/axis2/soap12testing/handlers/SOAP12OutFaultFlowHandlerDefault.java
    webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleB/org/apache/axis2/soap12testing/handlers/SOAP12OutFlowHandlerDefault.java
    webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleC/org/apache/axis2/soap12testing/handlers/SOAP12InFlowHandlerDefaultC.java
    webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleC/org/apache/axis2/soap12testing/handlers/SOAP12OutFaultFlowHandlerDefault.java
    webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleC/org/apache/axis2/soap12testing/handlers/SOAP12OutFlowHandlerDefault.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/HandlerExecutionTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/HandlerFailureTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/PausingHandlerExecutionTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/SpeakingHandler.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/SpeakingHandler1.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/util/FaultHandler.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AbstractDispatcher.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Handler.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/InstanceDispatcher.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Phase.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/AbstractTransportSender.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSSender.java
    webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/ModuleHandler1.java
    webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/SpeakingHandler.java
    webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/description/RegistryTest.java
    webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/description/SpeakingHandler.java
    webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/description/SpeakingHandler1.java
    webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/EnginePausingTest.java
    webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/handlers/Handler2.java
    webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/phaserule/PhaseRuleHandlers.java
    webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/registry/Handler3.java
    webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/sample/handlers/LoggingHandler.java
    webservices/axis2/trunk/java/modules/samples/src/userguide/loggingmodule/LogHandler.java
    webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/handlers/SavanInHandler.java
    webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/handlers/SavanOutHandler.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/RampartReceiver.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/RampartSender.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/WSDoAllHandler.java
    webservices/axis2/trunk/java/modules/soapmonitor/src/org/apache/axis2/handlers/soapmonitor/SOAPMonitorHandler.java

Modified: webservices/axis2/trunk/java/etc/project.properties
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/etc/project.properties?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/etc/project.properties (original)
+++ webservices/axis2/trunk/java/etc/project.properties Wed Oct 25 15:03:10 2006
@@ -32,6 +32,7 @@
 #                Dependency Repositories
 # -------------------------------------------------------------------
 maven.repo.remote=\
+http://ws.zones.apache.org/repository/,\
 http://www.ibiblio.org/maven/,\
 http://people.apache.org/repo/m1-ibiblio-rsync-repository/,\
 http://people.apache.org/repository/,\

Modified: webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java (original)
+++ webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java Wed Oct 25 15:03:10 2006
@@ -28,6 +28,7 @@
 import org.apache.axis2.addressing.RelatesTo;
 import org.apache.axis2.client.Options;
 import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.axis2.util.JavaUtils;
 
 import org.apache.commons.logging.Log;
@@ -45,14 +46,14 @@
     private static final Log log = LogFactory.getLog(AddressingInHandler.class);
 
 
-    public void invoke(MessageContext msgContext) throws AxisFault {
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault {
         // if another handler has already processed the addressing headers, do not do anything here.
         if (JavaUtils.isTrueExplicitly(msgContext.getProperty(IS_ADDR_INFO_ALREADY_PROCESSED))) {
             if(log.isDebugEnabled()) {
                 log.debug("Another handler has processed the addressing headers. Nothing to do here.");
             }
 
-            return;
+            return InvocationProcessingInstruction.CONTINUE_PROCESSING;
         }
         
         // check whether someone has explicitly set which addressing handler should run.
@@ -65,7 +66,7 @@
                 log.debug("This addressing handler does not match the specified namespace, " + namespace);
             }
 
-            return;
+            return InvocationProcessingInstruction.CONTINUE_PROCESSING;
         }
 
         SOAPHeader header = null;
@@ -76,7 +77,7 @@
         // if there are not headers put a flag to disable addressing temporary
         if (header == null) {
             msgContext.setProperty(DISABLE_ADDRESSING_FOR_OUT_MESSAGES, Boolean.TRUE);
-            return;
+            return InvocationProcessingInstruction.CONTINUE_PROCESSING;
         }
 
 		if(log.isDebugEnabled()) {
@@ -100,6 +101,8 @@
 				log.debug("No Headers present corresponding to " + addressingVersion);
 			}
         }
+        
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;
     }
 
     protected Options extractAddressingInformation(SOAPHeader header, MessageContext messageContext,

Modified: webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java (original)
+++ webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java Wed Oct 25 15:03:10 2006
@@ -32,6 +32,7 @@
 import org.apache.axis2.addressing.RelatesTo;
 import org.apache.axis2.client.Options;
 import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.axis2.util.JavaUtils;
 import org.apache.axis2.util.Utils;
 
@@ -43,12 +44,12 @@
 
 public class AddressingOutHandler extends AddressingHandler {
 
-    public void invoke(MessageContext msgContext) throws AxisFault {
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault {
         // it should be able to disable addressing by some one.
         Object property = msgContext.getProperty(DISABLE_ADDRESSING_FOR_OUT_MESSAGES);
         if (property != null && JavaUtils.isTrueExplicitly(property)) {
             log.debug("Addressing is disabled .....");
-            return;
+            return InvocationProcessingInstruction.CONTINUE_PROCESSING;
         }
 
         Object addressingVersionFromCurrentMsgCtxt = msgContext.getProperty(WS_ADDRESSING_VERSION);
@@ -117,6 +118,8 @@
         
         // process mustUnderstand attribute, if required.
         processMustUnderstandProperty(envelope, msgContext, addressingNamespaceObject);
+        
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;
     }
 
     private void processWSAAction(Options messageContextOptions, SOAPEnvelope envelope,

Modified: webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingWSDLValidationHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingWSDLValidationHandler.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingWSDLValidationHandler.java (original)
+++ webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingWSDLValidationHandler.java Wed Oct 25 15:03:10 2006
@@ -21,6 +21,7 @@
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.addressing.AddressingFaultsHelper;
 import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.axis2.util.JavaUtils;
 import org.apache.commons.logging.Log;
@@ -33,7 +34,7 @@
     /* (non-Javadoc)
      * @see org.apache.axis2.engine.Handler#invoke(org.apache.axis2.context.MessageContext)
      */
-    public void invoke(MessageContext msgContext) throws AxisFault {
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault {
     	// If no AxisOperation has been found at the end of the dispatch phase and addressing
         // is in use we should throw an ActionNotSupported Fault
         checkAction(msgContext);
@@ -41,6 +42,7 @@
         checkUsingAddressing(msgContext);
         // Check that if anonymous flag is in effect that the replyto and faultto are valid
         //checkAnonymous(msgContext);
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;
     }
     
     /**

Modified: webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleB/org/apache/axis2/soap12testing/handlers/SOAP12InFlowHandlerDefaultB.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleB/org/apache/axis2/soap12testing/handlers/SOAP12InFlowHandlerDefaultB.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleB/org/apache/axis2/soap12testing/handlers/SOAP12InFlowHandlerDefaultB.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleB/org/apache/axis2/soap12testing/handlers/SOAP12InFlowHandlerDefaultB.java Wed Oct 25 15:03:10 2006
@@ -18,6 +18,7 @@
 
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMAttribute;
@@ -51,7 +52,7 @@
 
     }
 
-    public void invoke(MessageContext msgContext) throws AxisFault {
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault {
         SOAPEnvelope envelope = msgContext.getEnvelope();
         SOAPFactory factory = OMAbstractFactory.getSOAP12Factory();
         SOAPHeader headerAdd = factory.createSOAPHeader(envelope);
@@ -156,6 +157,7 @@
             headerBlockPresent = new Integer(0);
             msgContext.getOperationContext().setProperty("HEADER_BLOCK_PRESENT", headerBlockPresent);
         }
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;
     }
 }
 

Modified: webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleB/org/apache/axis2/soap12testing/handlers/SOAP12OutFaultFlowHandlerDefault.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleB/org/apache/axis2/soap12testing/handlers/SOAP12OutFaultFlowHandlerDefault.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleB/org/apache/axis2/soap12testing/handlers/SOAP12OutFaultFlowHandlerDefault.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleB/org/apache/axis2/soap12testing/handlers/SOAP12OutFaultFlowHandlerDefault.java Wed Oct 25 15:03:10 2006
@@ -17,6 +17,7 @@
 package org.apache.axis2.soap12testing.handlers;
 
 import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.axiom.soap.SOAPHeader;
 import org.apache.axiom.soap.SOAPHeaderBlock;
@@ -30,7 +31,7 @@
 
     }
 
-    public void invoke(MessageContext msgContext) {
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) {
         Integer headerBlockPresent = (Integer) msgContext.getOperationContext().getProperty("HEADER_BLOCK_PRESENT");
         if (headerBlockPresent.equals(new Integer(1))) {
             SOAPHeader headerAdd = (SOAPHeader) msgContext.getOperationContext().getProperty("HEADER_BLOCK");
@@ -42,6 +43,7 @@
         } else {
             msgContext.getEnvelope().getHeader().discard();
         }
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;        
     }
 }
 

Modified: webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleB/org/apache/axis2/soap12testing/handlers/SOAP12OutFlowHandlerDefault.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleB/org/apache/axis2/soap12testing/handlers/SOAP12OutFlowHandlerDefault.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleB/org/apache/axis2/soap12testing/handlers/SOAP12OutFlowHandlerDefault.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleB/org/apache/axis2/soap12testing/handlers/SOAP12OutFlowHandlerDefault.java Wed Oct 25 15:03:10 2006
@@ -17,6 +17,7 @@
 package org.apache.axis2.soap12testing.handlers;
 
 import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.axiom.soap.SOAPHeader;
 import org.apache.axiom.soap.SOAPHeaderBlock;
@@ -30,7 +31,7 @@
 
     }
 
-    public void invoke(MessageContext msgContext) {
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) {
         Integer headerBlockPresent = (Integer) msgContext.getOperationContext().getProperty("HEADER_BLOCK_PRESENT");
         if (headerBlockPresent.equals(new Integer(1))) {
             SOAPHeader headerAdd = (SOAPHeader) msgContext.getOperationContext().getProperty("HEADER_BLOCK");
@@ -42,5 +43,6 @@
         } else {
             msgContext.getEnvelope().getHeader().discard();
         }
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;        
     }
 }

Modified: webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleC/org/apache/axis2/soap12testing/handlers/SOAP12InFlowHandlerDefaultC.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleC/org/apache/axis2/soap12testing/handlers/SOAP12InFlowHandlerDefaultC.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleC/org/apache/axis2/soap12testing/handlers/SOAP12InFlowHandlerDefaultC.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleC/org/apache/axis2/soap12testing/handlers/SOAP12InFlowHandlerDefaultC.java Wed Oct 25 15:03:10 2006
@@ -18,6 +18,7 @@
 
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMAttribute;
@@ -50,7 +51,7 @@
 
     }
 
-    public void invoke(MessageContext msgContext) throws AxisFault {
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault {
         SOAPEnvelope envelope = msgContext.getEnvelope();
         if (envelope.getHeader() != null) {
             Iterator headerBlocks = envelope.getHeader().examineAllHeaderBlocks();
@@ -159,5 +160,6 @@
             headerBlockPresent = new Integer(0);
             msgContext.getOperationContext().setProperty("HEADER_BLOCK_PRESENT", headerBlockPresent);
         }
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;        
     }
 }

Modified: webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleC/org/apache/axis2/soap12testing/handlers/SOAP12OutFaultFlowHandlerDefault.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleC/org/apache/axis2/soap12testing/handlers/SOAP12OutFaultFlowHandlerDefault.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleC/org/apache/axis2/soap12testing/handlers/SOAP12OutFaultFlowHandlerDefault.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleC/org/apache/axis2/soap12testing/handlers/SOAP12OutFaultFlowHandlerDefault.java Wed Oct 25 15:03:10 2006
@@ -17,6 +17,7 @@
 package org.apache.axis2.soap12testing.handlers;
 
 import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.axiom.soap.SOAPHeader;
 import org.apache.axiom.soap.SOAPHeaderBlock;
@@ -30,7 +31,7 @@
 
     }
 
-    public void invoke(MessageContext msgContext) {
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) {
         Integer headerBlockPresent = (Integer) msgContext.getOperationContext().getProperty("HEADER_BLOCK_PRESENT");
         if (headerBlockPresent.equals(new Integer(1))) {
             SOAPHeader headerAdd = (SOAPHeader) msgContext.getOperationContext().getProperty("HEADER_BLOCK");
@@ -42,5 +43,6 @@
         } else {
             msgContext.getEnvelope().getHeader().discard();
         }
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;
     }
 }

Modified: webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleC/org/apache/axis2/soap12testing/handlers/SOAP12OutFlowHandlerDefault.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleC/org/apache/axis2/soap12testing/handlers/SOAP12OutFlowHandlerDefault.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleC/org/apache/axis2/soap12testing/handlers/SOAP12OutFlowHandlerDefault.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleC/org/apache/axis2/soap12testing/handlers/SOAP12OutFlowHandlerDefault.java Wed Oct 25 15:03:10 2006
@@ -17,6 +17,7 @@
 package org.apache.axis2.soap12testing.handlers;
 
 import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.axiom.soap.SOAPHeader;
 import org.apache.axiom.soap.SOAPHeaderBlock;
@@ -30,7 +31,7 @@
 
     }
 
-    public void invoke(MessageContext msgContext) {
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) {
         Integer headerBlockPresent = (Integer) msgContext.getOperationContext().getProperty("HEADER_BLOCK_PRESENT");
         if (headerBlockPresent.equals(new Integer(1))) {
             SOAPHeader headerAdd = (SOAPHeader) msgContext.getOperationContext().getProperty("HEADER_BLOCK");
@@ -42,5 +43,6 @@
         } else {
             msgContext.getEnvelope().getHeader().discard();
         }
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;        
     }
 }

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/HandlerExecutionTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/HandlerExecutionTest.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/HandlerExecutionTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/HandlerExecutionTest.java Wed Oct 25 15:03:10 2006
@@ -496,7 +496,7 @@
       this.shouldPause = pause;
     }
     
-    public void invoke(MessageContext msgContext) throws AxisFault
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault
     {
       System.out.println("TestHandler "+handlerName+" invoked");
       if (shouldFail)
@@ -506,6 +506,7 @@
         throw new AxisFault("Handler failed");
       }
       testResults.add(handlerName);
+      return InvocationProcessingInstruction.CONTINUE_PROCESSING;      
     }
     
     public void flowComplete(MessageContext msgContext)

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/HandlerFailureTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/HandlerFailureTest.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/HandlerFailureTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/HandlerFailureTest.java Wed Oct 25 15:03:10 2006
@@ -123,7 +123,7 @@
     }
 
     private Handler culprit = new AbstractHandler() {
-        public void invoke(MessageContext msgContext) throws AxisFault {
+        public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault {
             throw new AxisFault(UtilServer.FAILURE_MESSAGE);
         }
     };

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/PausingHandlerExecutionTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/PausingHandlerExecutionTest.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/PausingHandlerExecutionTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/PausingHandlerExecutionTest.java Wed Oct 25 15:03:10 2006
@@ -197,7 +197,7 @@
       this.shouldPause = pause;
     }
 
-    public void invoke(MessageContext msgContext) throws AxisFault
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault
     {
       System.out.println("TestHandler " + handlerName + " invoked");
       if (shouldFail)
@@ -213,8 +213,9 @@
         msgContext.pause();
         shouldPause = false;
         new Worker(msgContext).start();
-        return;
+        return InvocationProcessingInstruction.SUSPEND_PROCESSING;
       }
+      return InvocationProcessingInstruction.CONTINUE_PROCESSING;      
     }
 
     public void flowComplete(MessageContext msgContext)

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/SpeakingHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/SpeakingHandler.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/SpeakingHandler.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/SpeakingHandler.java Wed Oct 25 15:03:10 2006
@@ -35,8 +35,9 @@
         return name;
     }
 
-    public void invoke(MessageContext msgContext) throws AxisFault {
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault {
         log.info("I am " + message + " Handler Running :)");
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;
     }
 
     public void revoke(MessageContext msgContext) {

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/SpeakingHandler1.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/SpeakingHandler1.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/SpeakingHandler1.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/SpeakingHandler1.java Wed Oct 25 15:03:10 2006
@@ -48,8 +48,9 @@
         return name;
     }
 
-    public void invoke(MessageContext msgContext) throws AxisFault {
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault {
         log.info("I am " + message + " Handler Running :)");
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;        
     }
 
     public void revoke(MessageContext msgContext) {

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/util/FaultHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/util/FaultHandler.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/util/FaultHandler.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/util/FaultHandler.java Wed Oct 25 15:03:10 2006
@@ -11,6 +11,7 @@
 import org.apache.axiom.soap.SOAPFaultValue;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.axis2.handlers.AbstractHandler;
 
 import javax.xml.namespace.QName;
@@ -40,7 +41,7 @@
     public static final String ERR_HANDLING_WITH_MSG_CTXT = "ErrorHandlingWithParamsSetToMsgCtxt";
     public static final String ERR_HANDLING_WITH_AXIS_FAULT = "ErrorHandlingWithParamsSetToAxisFault";
 
-    public void invoke(MessageContext msgContext) throws AxisFault {
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault {
         // this handler will be used to check the fault handling of Axis2.
         // this will create some dummy faults and send
 
@@ -77,6 +78,6 @@
             throw new AxisFault(new QName(M_FAULT_EXCEPTION), FAULT_REASON, null, null, detailEntry);
         }
 
-
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;
     }
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AbstractDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AbstractDispatcher.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AbstractDispatcher.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AbstractDispatcher.java Wed Oct 25 15:03:10 2006
@@ -73,7 +73,7 @@
      * @param msgctx
      * @throws org.apache.axis2.AxisFault
      */
-    public void invoke(MessageContext msgctx) throws AxisFault {
+    public InvocationProcessingInstruction invoke(MessageContext msgctx) throws AxisFault {
         AxisService axisService = msgctx.getAxisService();
 
         if (axisService == null) {
@@ -103,5 +103,7 @@
                         WSDLConstants.MESSAGE_LABEL_IN_VALUE));
             }
         }
+        
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;
     }
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java Wed Oct 25 15:03:10 2006
@@ -102,7 +102,7 @@
      * @param msgctx
      * @throws org.apache.axis2.AxisFault
      */
-    public void invoke(MessageContext msgctx) throws AxisFault {
+    public InvocationProcessingInstruction invoke(MessageContext msgctx) throws AxisFault {
 
         // first check we can dispatch using the relates to
         if (msgctx.getRelatesTo() != null) {
@@ -129,9 +129,9 @@
                 }
             }
 
-            return;
+            return InvocationProcessingInstruction.CONTINUE_PROCESSING;
         }
 
-        super.invoke(msgctx);
+        return super.invoke(msgctx);
     }
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java Wed Oct 25 15:03:10 2006
@@ -488,9 +488,9 @@
         msgContext.setFLOW(MessageContext.IN_FLOW);
         try
         {
-          invoke(msgContext, IS_INBOUND, NOT_RESUMING_EXECUTION);
+          InvocationProcessingInstruction pi = invoke(msgContext, IS_INBOUND, NOT_RESUMING_EXECUTION);
 
-          if (!msgContext.isPaused())
+          if (pi.equals(InvocationProcessingInstruction.CONTINUE_PROCESSING))
           {
             if (msgContext.isServerSide())
             {
@@ -503,6 +503,21 @@
             }
             flowComplete(msgContext, true);
           }
+          else if (pi.equals(InvocationProcessingInstruction.SUSPEND_PROCESSING))
+          {
+            return;
+          }
+          else if (pi.equals(InvocationProcessingInstruction.ABORT_PROCESSING))
+          {
+            flowComplete(msgContext, true);
+            return;
+          }
+          else
+          {
+            String errorMsg = "Unrecognized InvocationProcessingInstruction encountered in AxisEngine.receive()";
+            log.error(errorMsg);
+            throw new AxisFault(errorMsg);
+          }
         }
         catch (AxisFault e)
         {
@@ -517,20 +532,24 @@
      * if the msgContext is pauesd then the execution will be breaked
      *
      * @param msgContext
+     * @return An InvocationProcessingInstruction that indicates what 
+     *         the next step in the message processing should be.
      * @throws AxisFault
      */
-    public void invoke(MessageContext msgContext, boolean inbound, boolean resuming) throws AxisFault {
+    public InvocationProcessingInstruction invoke(MessageContext msgContext, boolean inbound, boolean resuming) throws AxisFault {
         if (msgContext.getCurrentHandlerIndex() == -1) {
             msgContext.setCurrentHandlerIndex(0);
         }
 
+        InvocationProcessingInstruction pi = InvocationProcessingInstruction.CONTINUE_PROCESSING;
+        
         while (msgContext.getCurrentHandlerIndex() < msgContext.getExecutionChain().size()) {
             Handler currentHandler = (Handler) msgContext.getExecutionChain().
                     get(msgContext.getCurrentHandlerIndex());
                         
             try
             {
-              currentHandler.invoke(msgContext);
+              pi = currentHandler.invoke(msgContext);
             }
             catch (AxisFault e)
             {
@@ -574,11 +593,16 @@
               }
             }
 
-            if (msgContext.isPaused()) {
-                break;
+            if (pi.equals(InvocationProcessingInstruction.SUSPEND_PROCESSING) ||
+                pi.equals(InvocationProcessingInstruction.ABORT_PROCESSING))
+            {
+              break;
             }
+
             msgContext.setCurrentHandlerIndex(msgContext.getCurrentHandlerIndex() + 1);
         }
+        
+        return pi;
     }
 
     private void flowComplete(MessageContext msgContext, boolean inbound) 
@@ -611,14 +635,23 @@
      * first invoke the phase list and after the message receiver
      *
      * @param msgContext
+     * @return An InvocationProcessingInstruction allowing the invoker to perhaps determine
+     *         whether or not the message processing will ever succeed.
      * @throws AxisFault
      */
-    public void resumeReceive(MessageContext msgContext) throws AxisFault {
+    public InvocationProcessingInstruction resumeReceive(MessageContext msgContext) throws AxisFault {
+      //REVIEW: This name is a little misleading, as it seems to indicate that there should be a resumeReceiveFault as well, when, in fact, this does both 
+      //REVIEW: Unlike with receive, there is no wrapping try/catch clause which would
+      //fire off the flowComplete on an error, as we have to assume that the
+      //message will be resumed again, but perhaps we need to unwind back to
+      //the point at which the message was resumed and provide another API
+      //to allow the full unwind if the message is going to be discarded.
         //invoke the phases
-        invoke(msgContext, IS_INBOUND, RESUMING_EXECUTION);
+        InvocationProcessingInstruction pi = invoke(msgContext, IS_INBOUND, RESUMING_EXECUTION);
         //invoking the MR
-        if (!msgContext.isPaused())
-        {          
+        
+        if (pi.equals(InvocationProcessingInstruction.CONTINUE_PROCESSING))
+        {
           if (msgContext.isServerSide())
           {
             // invoke the Message Receivers
@@ -628,6 +661,8 @@
           }
           flowComplete(msgContext, true);
         }
+        
+        return pi;
     }
 
     /**
@@ -635,18 +670,30 @@
      * TransportSender at the end
      *
      * @param msgContext
+     * @return An InvocationProcessingInstruction allowing the invoker to perhaps determine
+     *         whether or not the message processing will ever succeed.
+     * @throws AxisFault
      */
-    public void resumeSend(MessageContext msgContext) throws AxisFault {
+    public InvocationProcessingInstruction resumeSend(MessageContext msgContext) throws AxisFault {
+      //REVIEW: This name is a little misleading, as it seems to indicate that there should be a resumeSendFault as well, when, in fact, this does both 
+      //REVIEW: Unlike with send, there is no wrapping try/catch clause which would
+      //fire off the flowComplete on an error, as we have to assume that the
+      //message will be resumed again, but perhaps we need to unwind back to
+      //the point at which the message was resumed and provide another API
+      //to allow the full unwind if the message is going to be discarded.
         //invoke the phases
-        invoke(msgContext, IS_OUTBOUND, RESUMING_EXECUTION);
-        //Invoking Tarnsport Sender
-        if (!msgContext.isPaused()) {
+        InvocationProcessingInstruction pi = invoke(msgContext, IS_OUTBOUND, RESUMING_EXECUTION);
+        //Invoking Transport Sender
+        if (pi.equals(InvocationProcessingInstruction.CONTINUE_PROCESSING))
+        {
             // write the Message to the Wire
             TransportOutDescription transportOut = msgContext.getTransportOut();
             TransportSender sender = transportOut.getSender();
             sender.invoke(msgContext);
             flowComplete(msgContext, false);
         }
+        
+        return pi;
     }
 
     /**
@@ -668,28 +715,60 @@
         // affecting later messages.
         msgContext.setExecutionChain((ArrayList) preCalculatedPhases.clone());
         msgContext.setFLOW(MessageContext.IN_FAULT_FLOW);
-        invoke(msgContext, IS_INBOUND, NOT_RESUMING_EXECUTION);
         
-        if (!msgContext.isPaused())
+        try
         {
-          if (msgContext.isServerSide()) {
-            // invoke the Message Receivers
-            checkMustUnderstand(msgContext);
+          InvocationProcessingInstruction pi = invoke(msgContext, IS_INBOUND, NOT_RESUMING_EXECUTION);
 
-            MessageReceiver receiver = msgContext.getAxisOperation().getMessageReceiver();
+          if (pi.equals(InvocationProcessingInstruction.CONTINUE_PROCESSING))
+          {
+            if (msgContext.isServerSide())
+            {
+              // invoke the Message Receivers
+              checkMustUnderstand(msgContext);
+              
+              MessageReceiver receiver = msgContext.getAxisOperation().getMessageReceiver();
 
-            receiver.receive(msgContext);
+              receiver.receive(msgContext);
+            }
+            flowComplete(msgContext, true);
           }
+          else if (pi.equals(InvocationProcessingInstruction.SUSPEND_PROCESSING))
+          {
+            return;
+          }
+          else if (pi.equals(InvocationProcessingInstruction.ABORT_PROCESSING))
+          {
+            flowComplete(msgContext, true);
+            return;
+          }
+          else
+          {
+            String errorMsg = "Unrecognized InvocationProcessingInstruction encountered in AxisEngine.receiveFault()";
+            log.error(errorMsg);
+            throw new AxisFault(errorMsg);
+          }
+        }
+        catch (AxisFault e)
+        {
           flowComplete(msgContext, true);
+          throw e;
         }
     }
 
-    public void resume(MessageContext msgctx) throws AxisFault {
+    /**
+     * Resume processing of a message.
+     * @param msgctx
+     * @return An InvocationProcessingInstruction allowing the invoker to perhaps determine
+     *         whether or not the message processing will ever succeed.
+     * @throws AxisFault
+     */
+    public InvocationProcessingInstruction resume(MessageContext msgctx) throws AxisFault {
         msgctx.setPaused(false);
         if (msgctx.getFLOW() == MessageContext.IN_FLOW) {
-            resumeReceive(msgctx);
+            return resumeReceive(msgctx);
         } else {
-            resumeSend(msgctx);
+            return resumeSend(msgctx);
         }
     }
 
@@ -718,10 +797,10 @@
         msgContext.setFLOW(MessageContext.OUT_FLOW);
         try
         {
-          invoke(msgContext, IS_OUTBOUND, NOT_RESUMING_EXECUTION);
-
-          if (!msgContext.isPaused()) {
+          InvocationProcessingInstruction pi = invoke(msgContext, IS_OUTBOUND, NOT_RESUMING_EXECUTION);
 
+          if (pi.equals(InvocationProcessingInstruction.CONTINUE_PROCESSING))
+          {
             // write the Message to the Wire
             TransportOutDescription transportOut = msgContext.getTransportOut();
             if(transportOut == null) {
@@ -742,6 +821,21 @@
             //REVIEW: In the case of the TransportNonBlockingInvocationWorker, does this need to wait until that finishes?
             flowComplete(msgContext, false);
           }
+          else if (pi.equals(InvocationProcessingInstruction.SUSPEND_PROCESSING))
+          {
+            return;
+          }
+          else if (pi.equals(InvocationProcessingInstruction.ABORT_PROCESSING))
+          {
+            flowComplete(msgContext, false);
+            return;
+          }
+          else
+          {
+            String errorMsg = "Unrecognized InvocationProcessingInstruction encountered in AxisEngine.send()";
+            log.error(errorMsg);
+            throw new AxisFault(errorMsg);
+          }
         }
         catch (AxisFault e)
         {
@@ -759,6 +853,8 @@
     public void sendFault(MessageContext msgContext) throws AxisFault {
         OperationContext opContext = msgContext.getOperationContext();
 
+        //FIXME: If this gets paused in the operation-specific phases, the resume is not going to function correctly as the phases will not have all been set 
+        
         // find and execute the Fault Out Flow Handlers
         if (opContext != null) {
             AxisOperation axisOperation = opContext.getAxisOperation();
@@ -770,22 +866,62 @@
             outFaultPhases.addAll((ArrayList) faultExecutionChain.clone());
             msgContext.setExecutionChain((ArrayList) outFaultPhases.clone());
             msgContext.setFLOW(MessageContext.OUT_FAULT_FLOW);
-            invoke(msgContext, IS_OUTBOUND, NOT_RESUMING_EXECUTION);
+            try
+            {
+              InvocationProcessingInstruction pi = invoke(msgContext, IS_OUTBOUND, NOT_RESUMING_EXECUTION);
+              
+              if (pi.equals(InvocationProcessingInstruction.SUSPEND_PROCESSING))
+              {
+                log.warn("The resumption of this flow may function incorrectly, as the OutFaultFlow will not be used");
+                return;
+              }
+              else if (pi.equals(InvocationProcessingInstruction.ABORT_PROCESSING))
+              {
+                flowComplete(msgContext, false);
+                return;
+              }
+              else if (!pi.equals(InvocationProcessingInstruction.CONTINUE_PROCESSING))
+              {
+                String errorMsg = "Unrecognized InvocationProcessingInstruction encountered in AxisEngine.sendFault()";
+                log.error(errorMsg);
+                throw new AxisFault(errorMsg);
+              }
+            }
+            catch (AxisFault e)
+            {
+              flowComplete(msgContext, false);
+              throw e;
+            }
         }
+        
+        msgContext.setExecutionChain((ArrayList) msgContext.getConfigurationContext().getAxisConfiguration().getOutFaultFlow().clone());
+        msgContext.setFLOW(MessageContext.OUT_FAULT_FLOW);
+        InvocationProcessingInstruction pi = invoke(msgContext, IS_OUTBOUND, NOT_RESUMING_EXECUTION);
 
-        if (!msgContext.isPaused()) {
-            msgContext.setExecutionChain(
-                    (ArrayList) msgContext.getConfigurationContext()
-                            .getAxisConfiguration().getOutFaultFlow().clone());
-            msgContext.setFLOW(MessageContext.OUT_FAULT_FLOW);
-            invoke(msgContext, IS_OUTBOUND, NOT_RESUMING_EXECUTION);
-
-            // Actually send the SOAP Fault
-            TransportSender sender = msgContext.getTransportOut().getSender();
+        if (pi.equals(InvocationProcessingInstruction.CONTINUE_PROCESSING))
+        {
+          // Actually send the SOAP Fault
+          TransportSender sender = msgContext.getTransportOut().getSender();
 
-            sender.invoke(msgContext);
-            flowComplete(msgContext, false);
+          sender.invoke(msgContext);
+          flowComplete(msgContext, false);
+        }
+        else if (pi.equals(InvocationProcessingInstruction.SUSPEND_PROCESSING))
+        {
+          return;
         }
+        else if (pi.equals(InvocationProcessingInstruction.ABORT_PROCESSING))
+        {
+          flowComplete(msgContext, false);
+          return;
+        }
+        else
+        {
+          String errorMsg = "Unrecognized InvocationProcessingInstruction encountered in AxisEngine.sendFault()";
+          log.error(errorMsg);
+          throw new AxisFault(errorMsg);
+        }
+        
     }
 
     private String getSenderFaultCode(OMNamespace soapNamespace) {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Handler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Handler.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Handler.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Handler.java Wed Oct 25 15:03:10 2006
@@ -57,9 +57,11 @@
      *
      * @param msgContext the <code>MessageContext</code> to process with this
      *                   <code>Handler</code>.
+     * @return An InvocationProcessingInstruction that indicates what 
+     *         the next step in the message processing should be.
      * @throws AxisFault if the handler encounters an error
      */
-    public void invoke(MessageContext msgContext) throws AxisFault;
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault;
 
     /**
      * This method will be called on each registered handler that had its

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/InstanceDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/InstanceDispatcher.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/InstanceDispatcher.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/InstanceDispatcher.java Wed Oct 25 15:03:10 2006
@@ -46,7 +46,7 @@
      * @param msgContext
      * @throws org.apache.axis2.AxisFault
      */
-    public void invoke(MessageContext msgContext) throws AxisFault {
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault {
         ServiceContext serviceContext = msgContext.getServiceContext();
 
         if ((msgContext.getOperationContext() != null)
@@ -54,7 +54,7 @@
             msgContext.setServiceGroupContextId(
                     ((ServiceGroupContext) serviceContext.getParent()).getId());
 
-            return;
+            return InvocationProcessingInstruction.CONTINUE_PROCESSING;
         }
 
         // try to extract sgcId from the message
@@ -67,7 +67,7 @@
 
         // 1. look up opCtxt using mc.addressingHeaders.relatesTo[0]
         if (axisOperation == null) {
-            return;
+          return InvocationProcessingInstruction.CONTINUE_PROCESSING;
         }
 
         OperationContext operationContext =
@@ -105,6 +105,7 @@
         if (serviceContext != null) {
             serviceContext.setMyEPR(msgContext.getTo());
         }
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;
     }
 
     private void fillContextsFromSessionContext(MessageContext msgContext) throws AxisFault {

Added: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/InvocationProcessingInstruction.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/InvocationProcessingInstruction.java?view=auto&rev=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/InvocationProcessingInstruction.java (added)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/InvocationProcessingInstruction.java Wed Oct 25 15:03:10 2006
@@ -0,0 +1,47 @@
+/*
+* Copyright 2006 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.axis2.engine;
+
+/**
+ * This type encapsulates an enumeration of possible message processing
+ * instruction values that may be returned by a handler/phase within the
+ * runtime.  The returned instruction will determine the next step in
+ * the processing.
+ */
+public class InvocationProcessingInstruction
+{
+  public static InvocationProcessingInstruction CONTINUE_PROCESSING = new InvocationProcessingInstruction(0);
+  public static InvocationProcessingInstruction SUSPEND_PROCESSING = new InvocationProcessingInstruction(1);
+  public static InvocationProcessingInstruction ABORT_PROCESSING = new InvocationProcessingInstruction(2);
+  
+  private int instructionID;
+    
+  private InvocationProcessingInstruction(int instructionID)
+  {
+    this.instructionID = instructionID;
+  }
+    
+  public boolean equals(InvocationProcessingInstruction instruction)
+  {
+    return this.instructionID == instruction.instructionID;
+  }
+    
+  public int hashCode()
+  {
+    return instructionID;
+  }
+}

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Phase.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Phase.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Phase.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Phase.java Wed Oct 25 15:03:10 2006
@@ -350,10 +350,15 @@
      * invokes all the handlers in this Phase
      *
      * @param msgctx
+     * @return An InvocationProcessingInstruction that indicates what 
+     *         the next step in the message processing should be.
      * @throws org.apache.axis2.AxisFault
      */
-    public final void invoke(MessageContext msgctx) throws AxisFault {
+    public final InvocationProcessingInstruction invoke(MessageContext msgctx) throws AxisFault {
         boolean isDebugEnabled = log.isDebugEnabled();
+
+        InvocationProcessingInstruction pi = InvocationProcessingInstruction.CONTINUE_PROCESSING;
+          
         if (isDebugEnabled) {
             log.debug("Checking pre-condition for Phase \"" + phaseName + "\"");
         }
@@ -374,10 +379,10 @@
             if (isDebugEnabled) {
                 log.debug("Invoking Handler '" + handler.getName() + "' in Phase '" + phaseName + "'");
             }
-            handler.invoke(msgctx);
+            pi = handler.invoke(msgctx);
 
-            if (msgctx.isPaused()) {
-                return;
+            if (!pi.equals(InvocationProcessingInstruction.CONTINUE_PROCESSING)){
+                return pi;
             }
 
             currentIndex++;
@@ -390,6 +395,7 @@
 
         msgctx.setCurrentPhaseIndex(0);
         checkPostConditions(msgctx);
+        return pi;
     }
 
     public void flowComplete(MessageContext msgContext)

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/AbstractTransportSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/AbstractTransportSender.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/AbstractTransportSender.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/AbstractTransportSender.java Wed Oct 25 15:03:10 2006
@@ -28,6 +28,7 @@
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.HandlerDescription;
 import org.apache.axis2.description.TransportOutDescription;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.axis2.i18n.Messages;
 import org.apache.axis2.transport.http.HTTPTransportUtils;
@@ -71,7 +72,7 @@
      * @param msgContext
      * @throws AxisFault
      */
-    public void invoke(MessageContext msgContext) throws AxisFault {
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault {
 
         // Check for the REST behaviour, if you desire rest beahaviour
         // put a <parameter name="doREST" value="true"/> at the axis2.xml
@@ -117,6 +118,8 @@
             msgContext.getOperationContext().setProperty(Constants.RESPONSE_WRITTEN,
                     Constants.VALUE_TRUE);
         }
+        
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING; 
     }
 
     protected abstract OutputStream openTheConnection(EndpointReference epr, MessageContext msgctx)

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java Wed Oct 25 15:03:10 2006
@@ -30,6 +30,7 @@
 import org.apache.axis2.context.OperationContext;
 import org.apache.axis2.description.Parameter;
 import org.apache.axis2.description.TransportOutDescription;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.axis2.transport.OutTransportInfo;
 import org.apache.axis2.transport.TransportSender;
@@ -136,7 +137,7 @@
     }
 
 
-    public void invoke(MessageContext msgContext) throws AxisFault {
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault {
         try {
             OMOutputFormat format = new OMOutputFormat();
             String charSetEnc =
@@ -226,6 +227,8 @@
         } catch (IOException e) {
             throw new AxisFault(e);
         }
+        
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;
     }
 
     private void sendUsingOutputStream(MessageContext msgContext,

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSSender.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSSender.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSSender.java Wed Oct 25 15:03:10 2006
@@ -23,6 +23,7 @@
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.TransportOutDescription;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.axis2.transport.TransportSender;
 import org.apache.commons.logging.Log;
@@ -44,7 +45,7 @@
      * @param msgContext the message context to be sent
      * @throws AxisFault on exception
      */
-    public void invoke(MessageContext msgContext) throws AxisFault {
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault {
 
         log.debug("JMSSender invoke()");
 
@@ -67,7 +68,7 @@
             }
             else {
                 //Don't send the message.
-                return;
+                return InvocationProcessingInstruction.CONTINUE_PROCESSING;
             }
         }
         else if (msgContext.isServerSide()){
@@ -172,6 +173,7 @@
                 } catch (JMSException e) {} // ignore
             }
         }
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;
     }
 
     public void cleanup(MessageContext msgContext) throws AxisFault {

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/ModuleHandler1.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/ModuleHandler1.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/ModuleHandler1.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/ModuleHandler1.java Wed Oct 25 15:03:10 2006
@@ -2,6 +2,7 @@
 
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.engine.Handler;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -35,8 +36,9 @@
         return name;
     }
 
-    public void invoke(MessageContext msgContext) throws AxisFault {
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault {
         log.info("I am " + message + " Handler Running :)");
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;
     }
 
     public void revoke(MessageContext msgContext) {

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/SpeakingHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/SpeakingHandler.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/SpeakingHandler.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/SpeakingHandler.java Wed Oct 25 15:03:10 2006
@@ -19,6 +19,7 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.engine.Handler;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -37,8 +38,9 @@
         return name;
     }
 
-    public void invoke(MessageContext msgContext) throws AxisFault {
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault {
         log.info("I am " + message + " Handler Running :)");
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;
     }
 
     public void revoke(MessageContext msgContext) {

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/description/RegistryTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/description/RegistryTest.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/description/RegistryTest.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/description/RegistryTest.java Wed Oct 25 15:03:10 2006
@@ -21,6 +21,7 @@
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.engine.Handler;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.axis2.handlers.AbstractHandler;
 
 import javax.xml.namespace.QName;
@@ -83,7 +84,8 @@
         Handler handler = new AbstractHandler() {
             private static final long serialVersionUID = 196289132377245632L;
 
-			public void invoke(MessageContext msgContext)  {
+			public InvocationProcessingInstruction invoke(MessageContext msgContext)  {
+              return InvocationProcessingInstruction.CONTINUE_PROCESSING;
             }
         };
         handler.init(new HandlerDescription());

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/description/SpeakingHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/description/SpeakingHandler.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/description/SpeakingHandler.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/description/SpeakingHandler.java Wed Oct 25 15:03:10 2006
@@ -19,6 +19,7 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.engine.Handler;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -36,9 +37,10 @@
         return name;
     }
 
-    public void invoke(MessageContext msgContext) throws
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) throws
             AxisFault {
         log.info("I am " + message + " Handler Running :)");
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;
     }
 
     public void revoke(MessageContext msgContext) {

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/description/SpeakingHandler1.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/description/SpeakingHandler1.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/description/SpeakingHandler1.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/description/SpeakingHandler1.java Wed Oct 25 15:03:10 2006
@@ -19,6 +19,7 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.engine.Handler;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -36,8 +37,9 @@
         return name;
     }
 
-    public void invoke(MessageContext msgContext) throws AxisFault {
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault {
         log.info("I am " + message + " Handler Running :)");
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;        
     }
 
     public void revoke(MessageContext msgContext) {

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/EnginePausingTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/EnginePausingTest.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/EnginePausingTest.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/EnginePausingTest.java Wed Oct 25 15:03:10 2006
@@ -192,13 +192,15 @@
             init(new HandlerDescription("handler" + index));
         }
 
-        public void invoke(MessageContext msgContext) throws AxisFault {
+        public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault {
             if (pause) {
                 msgContext.pause();
                 pause = false;
-            } else {
+                return InvocationProcessingInstruction.SUSPEND_PROCESSING;
+                } else {
                 executedHandlers.add(index);
-            }
+                return InvocationProcessingInstruction.CONTINUE_PROCESSING;
+                }
         }
 
     }

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/handlers/Handler2.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/handlers/Handler2.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/handlers/Handler2.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/handlers/Handler2.java Wed Oct 25 15:03:10 2006
@@ -3,6 +3,7 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.engine.Handler;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 /*
@@ -35,8 +36,9 @@
         return name;
     }
 
-    public void invoke(MessageContext msgContext) throws AxisFault {
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault {
         log.info("I am " + message + " Handler Running :)");
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;        
     }
 
     public void revoke(MessageContext msgContext) {

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/phaserule/PhaseRuleHandlers.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/phaserule/PhaseRuleHandlers.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/phaserule/PhaseRuleHandlers.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/phaserule/PhaseRuleHandlers.java Wed Oct 25 15:03:10 2006
@@ -20,6 +20,7 @@
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.HandlerDescription;
 import org.apache.axis2.engine.Handler;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -33,8 +34,9 @@
 	private static final Log log = LogFactory.getLog(PhaseRuleHandlers.class);
     private QName name;
   
-    public void invoke(MessageContext msgContext) throws AxisFault {
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault {
         log.info("I am " + name + " Handler Running :)");
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;
     }
 
     public void revoke(MessageContext msgContext) {

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/registry/Handler3.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/registry/Handler3.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/registry/Handler3.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/registry/Handler3.java Wed Oct 25 15:03:10 2006
@@ -3,6 +3,7 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.engine.Handler;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -38,8 +39,9 @@
         return name;
     }
 
-    public void invoke(MessageContext msgContext) throws AxisFault {
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault {
         log.info("I am " + message + " Handler Running :)");
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;        
     }
 
     public void revoke(MessageContext msgContext) {

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/sample/handlers/LoggingHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/sample/handlers/LoggingHandler.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/sample/handlers/LoggingHandler.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/sample/handlers/LoggingHandler.java Wed Oct 25 15:03:10 2006
@@ -2,6 +2,7 @@
 
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -28,8 +29,9 @@
     
 	private static final Log log = LogFactory.getLog(LoggingHandler.class);
 
-    public void invoke(MessageContext msgContext) throws AxisFault {
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault {
         log.info("Incoming message From " + msgContext.getTo().getAddress());
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;        
     }
 
     public void revoke(MessageContext msgContext) {

Modified: webservices/axis2/trunk/java/modules/samples/src/userguide/loggingmodule/LogHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/src/userguide/loggingmodule/LogHandler.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/userguide/loggingmodule/LogHandler.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/userguide/loggingmodule/LogHandler.java Wed Oct 25 15:03:10 2006
@@ -19,6 +19,7 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.engine.Handler;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -33,8 +34,9 @@
         return name;
     }
 
-    public void invoke(MessageContext msgContext) throws AxisFault {
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault {
         log.info(msgContext.getEnvelope().toString());
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING; 
     }
 
     public void revoke(MessageContext msgContext) {

Modified: webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/handlers/SavanInHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/handlers/SavanInHandler.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/handlers/SavanInHandler.java (original)
+++ webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/handlers/SavanInHandler.java Wed Oct 25 15:03:10 2006
@@ -21,6 +21,7 @@
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.Parameter;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.savan.SavanConstants;
 import org.apache.savan.SavanException;
@@ -39,7 +40,7 @@
  */
 public class SavanInHandler extends AbstractHandler  {
 
-	public void invoke(MessageContext msgContext) throws AxisFault {
+	public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault {
 		
 		SavanMessageContext smc = new SavanMessageContext (msgContext);
 		
@@ -72,6 +73,7 @@
 		} else if (messageType==SavanConstants.MessageTypes.RENEW_MESSAGE) {
 			processor.renewSubscription(smc);
 		}
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;
 	}
 	
 	private void setSubscriberStore (SavanMessageContext smc) throws SavanException {

Modified: webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/handlers/SavanOutHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/handlers/SavanOutHandler.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/handlers/SavanOutHandler.java (original)
+++ webservices/axis2/trunk/java/modules/savan/src/org/apache/savan/handlers/SavanOutHandler.java Wed Oct 25 15:03:10 2006
@@ -21,6 +21,7 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.addressing.AddressingConstants;
 import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -42,7 +43,7 @@
 
 	Log log = LogFactory.getLog(SavanOutHandler.class);
 	
-	public void invoke(MessageContext msgContext) throws AxisFault {
+	public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault {
 
 		SavanMessageContext smc = new SavanMessageContext (msgContext);
 		int messagetype = smc.getMessageType();
@@ -80,6 +81,7 @@
 			
 			msgContext.pause();
 		}
+        return InvocationProcessingInstruction.SUSPEND_PROCESSING;
 
 	}
 

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/RampartReceiver.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/RampartReceiver.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/RampartReceiver.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/RampartReceiver.java Wed Oct 25 15:03:10 2006
@@ -25,6 +25,7 @@
 import org.apache.axis2.description.HandlerDescription;
 import org.apache.axis2.description.Parameter;
 import org.apache.axis2.engine.Handler;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.rampart.RampartEngine;
 import org.apache.rampart.RampartException;
 import org.apache.rampart.util.Axis2Util;
@@ -62,10 +63,10 @@
         this.handlerDesc = handlerdesc;
     }
 
-    public void invoke(MessageContext msgContext) throws AxisFault {
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault {
         
         if (!msgContext.isEngaged(new QName(WSSHandlerConstants.SECURITY_MODULE_NAME))) {
-            return;
+          return InvocationProcessingInstruction.CONTINUE_PROCESSING;
         }
         
         RampartEngine engine = new RampartEngine();
@@ -89,7 +90,7 @@
         }
         
         if(wsResult == null) {
-            return;
+          return InvocationProcessingInstruction.CONTINUE_PROCESSING;
         }
         
         Vector results = null;
@@ -123,7 +124,7 @@
         }
 
         headerBlock.setProcessed();
-
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;
     }
 
     public HandlerDescription getHandlerDesc() {

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/RampartSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/RampartSender.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/RampartSender.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/RampartSender.java Wed Oct 25 15:03:10 2006
@@ -21,6 +21,7 @@
 import org.apache.axis2.description.HandlerDescription;
 import org.apache.axis2.description.Parameter;
 import org.apache.axis2.engine.Handler;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.rampart.MessageBuilder;
 import org.apache.rampart.RampartException;
 import org.apache.ws.secpolicy.WSSPolicyException;
@@ -48,10 +49,10 @@
         this.handlerDesc = handlerdesc;
     }
 
-    public void invoke(MessageContext msgContext) throws AxisFault {
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault {
         
         if (!msgContext.isEngaged(new QName(WSSHandlerConstants.SECURITY_MODULE_NAME))) {
-            return;
+          return InvocationProcessingInstruction.CONTINUE_PROCESSING;
         }
         
         MessageBuilder builder = new MessageBuilder();
@@ -64,6 +65,7 @@
         } catch (RampartException e) {
             throw new AxisFault(e.getMessage(), e);
         }
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;        
     }
 
     public void flowComplete(MessageContext msgContext)

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/WSDoAllHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/WSDoAllHandler.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/WSDoAllHandler.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/WSDoAllHandler.java Wed Oct 25 15:03:10 2006
@@ -21,6 +21,7 @@
 import org.apache.axis2.description.HandlerDescription;
 import org.apache.axis2.description.Parameter;
 import org.apache.axis2.engine.Handler;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.rampart.util.Axis2Util;
 import org.apache.ws.security.handler.WSHandler;
 
@@ -67,12 +68,13 @@
     /* (non-Javadoc)
     * @see org.apache.axis2.engine.Handler#invoke(org.apache.axis2.context.MessageContext)
     */
-    public void invoke(MessageContext msgContext) throws AxisFault {
+    public InvocationProcessingInstruction invoke(MessageContext msgContext) throws AxisFault {
         //If the security module is not engaged for this service
         //do not do any processing
         if (msgContext.isEngaged(new QName(WSSHandlerConstants.SECURITY_MODULE_NAME))) {
             this.processMessage(msgContext);
         }
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;        
     }
 
     public void flowComplete(MessageContext msgContext)

Modified: webservices/axis2/trunk/java/modules/soapmonitor/src/org/apache/axis2/handlers/soapmonitor/SOAPMonitorHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/soapmonitor/src/org/apache/axis2/handlers/soapmonitor/SOAPMonitorHandler.java?view=diff&rev=467781&r1=467780&r2=467781
==============================================================================
--- webservices/axis2/trunk/java/modules/soapmonitor/src/org/apache/axis2/handlers/soapmonitor/SOAPMonitorHandler.java (original)
+++ webservices/axis2/trunk/java/modules/soapmonitor/src/org/apache/axis2/handlers/soapmonitor/SOAPMonitorHandler.java Wed Oct 25 15:03:10 2006
@@ -19,6 +19,7 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.engine.InvocationProcessingInstruction;
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.axis2.soapmonitor.servlet.SOAPMonitorConstants;
 import org.apache.axis2.soapmonitor.servlet.SOAPMonitorService;
@@ -51,7 +52,7 @@
     /**
      * Process and SOAP message
      */
-    public void invoke(MessageContext messageContext) throws AxisFault {
+    public InvocationProcessingInstruction invoke(MessageContext messageContext) throws AxisFault {
 
         EndpointReference ref = null;
 
@@ -102,6 +103,7 @@
         if ((id != null) && (soap != null)) {
             SOAPMonitorService.publishMessage(id, type, target, soap);
         }
+        return InvocationProcessingInstruction.CONTINUE_PROCESSING;
     }
 
     /**



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


Mime
View raw message