axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntha...@apache.org
Subject svn commit: r559975 - /webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
Date Thu, 26 Jul 2007 21:06:58 GMT
Author: nthaker
Date: Thu Jul 26 14:06:58 2007
New Revision: 559975

URL: http://svn.apache.org/viewvc?view=rev&rev=559975
Log:
Axis2_3023

Modified:
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java

Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java?view=diff&rev=559975&r1=559974&r2=559975
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
(original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
Thu Jul 26 14:06:58 2007
@@ -49,7 +49,9 @@
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Set;
 //import org.apache.log4j.BasicConfigurator;
+import java.util.Map;
 
 /** @see ../EndpointInterfaceDescription */
 class EndpointInterfaceDescriptionImpl
@@ -58,6 +60,7 @@
     private EndpointDescriptionImpl parentEndpointDescription;
     private ArrayList<OperationDescription> operationDescriptions =
             new ArrayList<OperationDescription>();
+    private Map<QName, List<OperationDescription>> dispatchableOperations = new
HashMap<QName, List<OperationDescription>>();
     // This may be an actual Service Endpoint Interface -OR- it may be a service implementation
class that did not 
     // specify an @WebService.endpointInterface.
     private Class seiClass;
@@ -95,6 +98,15 @@
 
     void addOperation(OperationDescription operation) {
         operationDescriptions.add(operation);
+        
+        if (!operation.isJAXWSAsyncClientMethod()) {
+        	List<OperationDescription> operations = dispatchableOperations.get(operation.getName());
+        	if(operations==null) {
+        		operations = new ArrayList<OperationDescription>();
+        		dispatchableOperations.put(operation.getName(), operations);
+        	}
+        	operations.add(operation);
+        }
     }
 
     EndpointInterfaceDescriptionImpl(Class sei, EndpointDescriptionImpl parent) {
@@ -474,22 +486,14 @@
     * @see org.apache.axis2.jaxws.description.EndpointInterfaceDescription#getDispatchableOperation(QName
operationQName)
     */
     public OperationDescription[] getDispatchableOperation(QName operationQName) {
-        OperationDescription[] returnOperations = null;
-        OperationDescription[] allMatchingOperations = getOperation(operationQName);
-        if (allMatchingOperations != null && allMatchingOperations.length > 0)
{
-            ArrayList<OperationDescription> dispatchableOperations =
-                    new ArrayList<OperationDescription>();
-            for (OperationDescription operation : allMatchingOperations) {
-                if (!operation.isJAXWSAsyncClientMethod()) {
-                    dispatchableOperations.add(operation);
-                }
-            }
-
-            if (dispatchableOperations.size() > 0) {
-                returnOperations = dispatchableOperations.toArray(new OperationDescription[0]);
-            }
-        }
-        return returnOperations;
+    	//FIXME:OperationDescriptionImpl creates operation qname with empty namespace. Thus
using localname
+    	//to read dispachable operation.
+    	QName key = new QName("",operationQName.getLocalPart());
+    	List<OperationDescription> operations = dispatchableOperations.get(key);
+    	if(operations!=null){
+    		return operations.toArray(new OperationDescription[operations.size()]);
+    	}
+    	return new OperationDescription[0];
     }
     /* (non-Javadoc)
      * @see org.apache.axis2.jaxws.description.EndpointInterfaceDescription#getDispatchableOperations()



---------------------------------------------------------------------
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