cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r965981 - in /cxf/trunk/rt/frontend: jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Date Tue, 20 Jul 2010 20:03:27 GMT
Author: dkulp
Date: Tue Jul 20 20:03:27 2010
New Revision: 965981

URL: http://svn.apache.org/viewvc?rev=965981&view=rev
Log:
Allow XmlElementWrapper on return collection things.

Modified:
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
    cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java?rev=965981&r1=965980&r2=965981&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
(original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
Tue Jul 20 20:03:27 2010
@@ -33,6 +33,7 @@ import java.util.logging.Logger;
 
 import javax.xml.bind.annotation.XmlAttachmentRef;
 import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlList;
 import javax.xml.bind.annotation.XmlMimeType;
 import javax.xml.bind.annotation.XmlNsForm;
@@ -102,7 +103,8 @@ public final class WrapperClassGenerator
                 if (anno.annotationType() == XmlList.class 
                     || anno.annotationType() == XmlAttachmentRef.class
                     || anno.annotationType() == XmlJavaTypeAdapter.class
-                    || anno.annotationType() == XmlMimeType.class) {
+                    || anno.annotationType() == XmlMimeType.class
+                    || anno.annotationType() == XmlElementWrapper.class) {
                     list.add(anno);
                 }
             }
@@ -395,7 +397,14 @@ public final class WrapperClassGenerator
                 av0.visit("defaultValue", el.defaultValue());
                 av0.visit("type", el.type());
                 av0.visitEnd(); 
-                
+            } else if (ann instanceof XmlElementWrapper) {
+                XmlElementWrapper el = (XmlElementWrapper)ann;
+                av0 = fv.visitAnnotation("Ljavax/xml/bind/annotation/XmlElementWrapper;",
true);
+                av0.visit("name", el.name());
+                av0.visit("nillable", el.nillable());
+                av0.visit("requried", el.required());
+                av0.visit("namespace", el.namespace());
+                av0.visitEnd(); 
             }
         }
         return addedEl;

Modified: cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=965981&r1=965980&r2=965981&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
(original)
+++ cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Tue Jul 20 20:03:27 2010
@@ -48,6 +48,7 @@ import java.util.logging.Logger;
 
 import javax.wsdl.Operation;
 import javax.xml.bind.annotation.XmlAttachmentRef;
+import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlList;
 import javax.xml.bind.annotation.XmlMimeType;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
@@ -1393,6 +1394,9 @@ public class ReflectionServiceFactoryBea
                 if (anno instanceof XmlJavaTypeAdapter) {
                     map.put(XmlJavaTypeAdapter.class, true);
                 }
+                if (anno instanceof XmlElementWrapper) {
+                    map.put(XmlElementWrapper.class, true);
+                }
             }
         }
         return map;



Mime
View raw message