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 di...@apache.org on 2007/03/13 15:39:04 UTC

svn commit: r517711 - in /webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt: DocLitBareMinimalMethodMarshaller.java DocLitWrappedPlusMethodMarshaller.java

Author: dims
Date: Tue Mar 13 07:39:03 2007
New Revision: 517711

URL: http://svn.apache.org/viewvc?view=rev&rev=517711
Log:
If there are no annotations, then treat it as non jaxb object and work with the java types directly, as jaxb gets confused

Modified:
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitBareMinimalMethodMarshaller.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedPlusMethodMarshaller.java

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitBareMinimalMethodMarshaller.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitBareMinimalMethodMarshaller.java?view=diff&rev=517711&r1=517710&r2=517711
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitBareMinimalMethodMarshaller.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitBareMinimalMethodMarshaller.java Tue Mar 13 07:39:03 2007
@@ -20,6 +20,7 @@
 
 import java.util.List;
 import java.util.TreeSet;
+import java.lang.annotation.Annotation;
 
 import javax.xml.namespace.QName;
 import javax.xml.ws.WebServiceException;
@@ -165,8 +166,14 @@
             for (int i=0; i < pds.length; i++) {
                 ParameterDescription pd = pds[i];
                 Class type = pd.getParameterActualType();
+                // If it is a JAXB basic type or it has no annotations
                 if (MethodMarshallerUtils.isJAXBBasicType(type)) {
                     javaTypes[i] = type;                    
+                } else {
+                    Annotation annos[] = type.getAnnotations();
+                    if(annos == null || annos.length==0){
+                        javaTypes[i] = type;
+                    }
                 }
             }
             

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedPlusMethodMarshaller.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedPlusMethodMarshaller.java?view=diff&rev=517711&r1=517710&r2=517711
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedPlusMethodMarshaller.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedPlusMethodMarshaller.java Tue Mar 13 07:39:03 2007
@@ -24,6 +24,7 @@
 import java.util.Map;
 import java.util.HashMap;
 import java.util.TreeSet;
+import java.lang.annotation.Annotation;
 
 import javax.jws.WebMethod;
 import javax.jws.WebParam;
@@ -358,6 +359,11 @@
                         Class actualType = pd.getParameterActualType();
                         if (MethodMarshallerUtils.isJAXBBasicType(actualType)) {
                             blkContext.setProcessType(actualType);
+                        } else {
+                            Annotation annos[] = actualType.getAnnotations();
+                            if (annos == null || annos.length == 0) {
+                                blkContext.setProcessType(actualType);
+                            }
                         }
                     }
                     block = message.getHeaderBlock(pd.getTargetNamespace(), localName, blkContext, factory);



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