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 de...@apache.org on 2005/08/27 11:41:14 UTC

svn commit: r240399 - in /webservices/axis/trunk/java/modules/core/src/org/apache/axis2: deployment/ServiceBuilder.java description/ServiceDescription.java

Author: deepal
Date: Sat Aug 27 02:41:08 2005
New Revision: 240399

URL: http://svn.apache.org/viewcvs?rev=240399&view=rev
Log:
correcting some mistakes that I have done when moving staxt to OM (Deploymnt parasing)

if there is parameter(parameters )in operation element with the name "wsamapping" , then a mapping entry (was-action to operation) will be added to the ServiceDescription.java (in service.xml), if the operation in module.xml has that kind of parameter when engaging that module 

a mapping entry will be added to the ServiceDescription.java

WSA-Action based dispatching  will be done according to those mapping. 

Modified:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ServiceDescription.java

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java?rev=240399&r1=240398&r2=240399&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java Sat Aug 27 02:41:08 2005
@@ -7,6 +7,7 @@
 import org.apache.axis2.om.OMAttribute;
 import org.apache.axis2.om.OMElement;
 import org.apache.axis2.om.impl.OMOutputImpl;
+import org.apache.axis2.Constants;
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLOutputFactory;
@@ -98,7 +99,7 @@
                 } else {
                     service.setServiceDescription(descriptionElement.getText());
                 }
-            } 
+            }
 
             //processing servicewide modules which required to engage gloabbly
             Iterator moduleRefs = service_element.getChildrenWithName(
@@ -136,6 +137,15 @@
             ArrayList ops = processOpeartions(opeartinsItr);
             for (int i = 0; i < ops.size(); i++) {
                 OperationDescription opeartionDesc = (OperationDescription) ops.get(i);
+                ArrayList paramters = opeartionDesc.getParameters();
+
+                // Adding wsa-maping into service
+                for (int j = 0; j < paramters.size(); j++) {
+                    Parameter parameter = (Parameter) paramters.get(j);
+                    if(parameter.getName().equals(Constants.WSA_ACTION)){
+                        service.addMapping((String)parameter.getValue(),opeartionDesc);
+                    }
+                }
                 service.addOperation(opeartionDesc);
             }
 

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ServiceDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ServiceDescription.java?rev=240399&r1=240398&r2=240399&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ServiceDescription.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ServiceDescription.java Sat Aug 27 02:41:08 2005
@@ -18,6 +18,7 @@
 import com.ibm.wsdl.extensions.soap.SOAPAddressImpl;
 import com.ibm.wsdl.extensions.soap.SOAPConstants;
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
 import org.apache.axis2.om.OMElement;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.ServiceContext;
@@ -144,6 +145,14 @@
         PhaseResolver pr = new PhaseResolver(axisConfig, this);
         for (Iterator iterator = col.iterator(); iterator.hasNext();) {
             OperationDescription operation = (OperationDescription) iterator.next();
+            ArrayList paramters = operation.getParameters();
+            // Adding wsa-maping into service
+            for (int j = 0; j < paramters.size(); j++) {
+                Parameter parameter = (Parameter) paramters.get(j);
+                if(parameter.getName().equals(Constants.WSA_ACTION)){
+                    this.addMapping((String)parameter.getValue(),operation);
+                }
+            }
             this.addOperation(operation);
         }
     }
@@ -571,7 +580,7 @@
         } else {
             serviceContext =
                     msgContext.getSystemContext()
-                    .getServiceContext(msgContext.getServiceInstanceID());
+                            .getServiceContext(msgContext.getServiceInstanceID());
         }
 
         return serviceContext;