You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2010/10/18 16:32:37 UTC
svn commit: r1023814 - in /cxf/branches/2.2.x-fixes: ./
rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
Author: dkulp
Date: Mon Oct 18 14:32:37 2010
New Revision: 1023814
URL: http://svn.apache.org/viewvc?rev=1023814&view=rev
Log:
Merged revisions 1023805 via svnmerge from
https://svn.apache.org/repos/asf/cxf/branches/2.3.x-fixes
................
r1023805 | dkulp | 2010-10-18 10:02:56 -0400 (Mon, 18 Oct 2010) | 10 lines
Merged revisions 1023804 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1023804 | dkulp | 2010-10-18 09:57:37 -0400 (Mon, 18 Oct 2010) | 2 lines
[CXF-3069] Make sure proper XmlElement annotations are output when using
asm generated wrappers
........
................
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/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
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=1023814&r1=1023813&r2=1023814&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 Mon Oct 18 14:32:37 2010
@@ -104,6 +104,7 @@ public final class WrapperClassGenerator
|| anno.annotationType() == XmlAttachmentRef.class
|| anno.annotationType() == XmlJavaTypeAdapter.class
|| anno.annotationType() == XmlMimeType.class
+ || anno.annotationType() == XmlElement.class
|| anno.annotationType() == XmlElementWrapper.class) {
list.add(anno);
}
@@ -395,7 +396,9 @@ public final class WrapperClassGenerator
av0.visit("required", el.required());
av0.visit("namespace", el.namespace());
av0.visit("defaultValue", el.defaultValue());
- av0.visit("type", el.type());
+ if (el.type() != XmlElement.DEFAULT.class) {
+ av0.visit("type", el.type());
+ }
av0.visitEnd();
} else if (ann instanceof XmlElementWrapper) {
XmlElementWrapper el = (XmlElementWrapper)ann;
Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java?rev=1023814&r1=1023813&r2=1023814&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java (original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java Mon Oct 18 14:32:37 2010
@@ -39,6 +39,7 @@ import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.ParameterStyle;
import javax.jws.soap.SOAPBinding.Style;
+import javax.xml.bind.annotation.XmlElement;
import javax.xml.namespace.QName;
import javax.xml.ws.Action;
import javax.xml.ws.Holder;
@@ -63,6 +64,7 @@ import org.apache.cxf.service.model.Mess
import org.apache.cxf.service.model.OperationInfo;
public class JaxWsServiceConfiguration extends AbstractServiceConfiguration {
+
private static final Logger LOG = LogUtils.getL7dLogger(JaxWsServiceConfiguration.class);
private JaxWsImplementorInfo implInfo;
@@ -840,4 +842,18 @@ public class JaxWsServiceConfiguration e
return null;
}
+ public Long getWrapperPartMinOccurs(MessagePartInfo mpi) {
+ Annotation[] a = (Annotation[])mpi.getProperty(ReflectionServiceFactoryBean.PARAM_ANNOTATION);
+ for (Annotation a2 : a) {
+ if (a2 instanceof XmlElement) {
+ XmlElement e = (XmlElement)a2;
+ if (e.required()) {
+ return 1L;
+ }
+ }
+ }
+ return null;
+ }
+
+
}