axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sc...@apache.org
Subject svn commit: r481486 - in /webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws: description/impl/OperationDescriptionImpl.java description/impl/ParameterDescriptionImpl.java message/databinding/impl/JAXBBlockImpl.java
Date Sat, 02 Dec 2006 01:50:27 GMT
Author: scheu
Date: Fri Dec  1 17:50:23 2006
New Revision: 481486

URL: http://svn.apache.org/viewvc?view=rev&rev=481486
Log:
AXIS2-1807
Contributor:Rich Scheuerle
Quick Change to consider ParameterizedType in OperationDescription and ParameterDescription.

Modified:
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/impl/ParameterDescriptionImpl.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/impl/JAXBBlockImpl.java

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java?view=diff&rev=481486&r1=481485&r2=481486
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java
Fri Dec  1 17:50:23 2006
@@ -1155,13 +1155,26 @@
      * @see org.apache.axis2.jaxws.description.OperationDescription#getResultActualType()
      */
     public Class getResultActualType() {
+        
+        // REVIEW:
+        // Do we want to add a getParameterActualGenericType that would return Type
+        // instead of Class ?
+        
+        // NOTE
+        // If you change this code, please remember to change 
+        // ParameterDescription.getParameterActualType
+        
        Class returnType = getResultType();
        if(isAsync()){
            //pooling implementation
            if(Response.class == returnType){
                Type type = seiMethod.getGenericReturnType();
                ParameterizedType pType = (ParameterizedType) type;
-               return (Class)pType.getActualTypeArguments()[0];    
+               Type aType = (Class) pType.getActualTypeArguments()[0];
+               if (aType != null && ParameterizedType.class.isInstance(aType)) {
+                   return (Class) ((ParameterizedType) aType).getRawType();
+               }
+               return (Class) aType;    
            }
            //Callback Implementation
            else{
@@ -1171,7 +1184,11 @@
                for(Class param:parameters){
                    if(AsyncHandler.class.isAssignableFrom(param)){
                        ParameterizedType pType = (ParameterizedType)type[i];
-                       return (Class)pType.getActualTypeArguments()[0];
+                       Type aType = (Class) pType.getActualTypeArguments()[0];
+                       if (aType != null && ParameterizedType.class.isInstance(aType))
{
+                           return (Class) ((ParameterizedType) aType).getRawType();
+                       }
+                       return (Class)aType;
                    }
                    i++;
                }

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/impl/ParameterDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/impl/ParameterDescriptionImpl.java?view=diff&rev=481486&r1=481485&r2=481486
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/impl/ParameterDescriptionImpl.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/description/impl/ParameterDescriptionImpl.java
Fri Dec  1 17:50:23 2006
@@ -115,8 +115,21 @@
      */
     public Class getParameterActualType() {
         if (isHolderType() && parameterGenericType != null) {
+            
+            // REVIEW:
+            // Do we want to add a getParameterActualGenericType that would return Type
+            // instead of Class ?
+            
+            // NOTE
+            // If you change this code, please remember to change 
+            // OperationDesc.getResultActualType
+            
             // For types of Holder<T>, return the class associated with T
-            return (Class) parameterGenericType.getActualTypeArguments()[0];
+            Type type = (Class) parameterGenericType.getActualTypeArguments()[0];
+            if (type != null && ParameterizedType.class.isInstance(type)) {
+                return (Class) ((ParameterizedType) type).getRawType();
+            }
+            return (Class) type;
         }
         else {
             return parameterType;

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/impl/JAXBBlockImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/impl/JAXBBlockImpl.java?view=diff&rev=481486&r1=481485&r2=481486
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/impl/JAXBBlockImpl.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/impl/JAXBBlockImpl.java
Fri Dec  1 17:50:23 2006
@@ -18,6 +18,7 @@
 
 import java.io.StringReader;
 import java.io.StringWriter;
+import java.lang.reflect.Type;
 import java.util.List;
 
 import javax.xml.bind.JAXBElement;



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