Author: dkulp
Date: Fri Jul 23 20:36:55 2010
New Revision: 967249
URL: http://svn.apache.org/viewvc?rev=967249&view=rev
Log:
Merged revisions 965981 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r965981 | dkulp | 2010-07-20 16:03:27 -0400 (Tue, 20 Jul 2010) | 1 line
Allow XmlElementWrapper on return collection things.
........
Modified:
cxf/branches/2.2.x-fixes/ (props changed)
cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
cxf/branches/2.2.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Propchange: cxf/branches/2.2.x-fixes/
('svn:mergeinfo' removed)
Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java?rev=967249&r1=967248&r2=967249&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
(original)
+++
cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
Fri Jul 23 20:36:55 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/branches/2.2.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=967249&r1=967248&r2=967249&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
(original)
+++
cxf/branches/2.2.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Fri Jul 23 20:36:55 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;
@@ -1372,6 +1373,9 @@ public class ReflectionServiceFactoryBea
if (anno instanceof XmlJavaTypeAdapter) {
map.put(XmlJavaTypeAdapter.class, true);
}
+ if (anno instanceof XmlElementWrapper) {
+ map.put(XmlElementWrapper.class, true);
+ }
}
}
return map;