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 he...@apache.org on 2005/06/30 07:58:32 UTC

svn commit: r202486 - in /webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine: AxisConfigurationImpl.java SOAPActionBasedDispatcher.java

Author: hemapani
Date: Wed Jun 29 22:58:31 2005
New Revision: 202486

URL: http://svn.apache.org/viewcvs?rev=202486&view=rev
Log:
add the SOAP action based dipatcher

Added:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/SOAPActionBasedDispatcher.java
Modified:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisConfigurationImpl.java

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisConfigurationImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisConfigurationImpl.java?rev=202486&r1=202485&r2=202486&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisConfigurationImpl.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisConfigurationImpl.java Wed Jun 29 22:58:31 2005
@@ -99,7 +99,8 @@
         Phase dispatch = new Phase(PhaseMetadata.PHASE_DISPATCH);
         dispatch.addHandler(new AddressingBasedDispatcher(), 0);
         dispatch.addHandler(new RequestURIBasedDispatcher(), 1);
-        dispatch.addHandler(new SOAPMessageBodyBasedDispatcher(),2);
+        dispatch.addHandler(new SOAPActionBasedDispatcher(), 2);
+        dispatch.addHandler(new SOAPMessageBodyBasedDispatcher(),3);
         inPhasesUptoAndIncludingPostDispatch.add(dispatch);
         
         Phase postDispatch = new Phase(PhaseMetadata.PHASE_POST_DISPATCH);

Added: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/SOAPActionBasedDispatcher.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/SOAPActionBasedDispatcher.java?rev=202486&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/SOAPActionBasedDispatcher.java (added)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/SOAPActionBasedDispatcher.java Wed Jun 29 22:58:31 2005
@@ -0,0 +1,59 @@
+/*
+* Copyright 2004,2005 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.axis.engine;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.context.MessageContext;
+import org.apache.axis.description.HandlerDescription;
+import org.apache.axis.description.OperationDescription;
+import org.apache.axis.description.ServiceDescription;
+
+/**
+ * Class Dispatcher
+ */
+public class SOAPActionBasedDispatcher extends AbstractDispatcher {
+    /**
+     * Field NAME
+     */
+    public static final QName NAME =
+        new QName("http://axis.ws.apache.org", "SOAPActionBasedDispatcher");
+
+    public SOAPActionBasedDispatcher() {
+        init(new HandlerDescription(NAME));
+    }
+
+    public OperationDescription findOperation(
+        ServiceDescription service,
+        MessageContext messageContext)
+        throws AxisFault {
+
+        String action = (String) messageContext.getSoapAction();
+        if (action != null) {
+            OperationDescription op = service.getOperationBySOAPAction(action);
+            return op;
+        }
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.axis.engine.AbstractDispatcher#findService(org.apache.axis.context.MessageContext)
+     */
+    public ServiceDescription findService(MessageContext messageContext) throws AxisFault {
+        return null;
+    }
+
+}