cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1056487 - /cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
Date Fri, 07 Jan 2011 20:18:33 GMT
Author: dkulp
Date: Fri Jan  7 20:18:33 2011
New Revision: 1056487

URL: http://svn.apache.org/viewvc?rev=1056487&view=rev
Log:
Make sure the WebParam name is used

Modified:
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.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=1056487&r1=1056486&r2=1056487&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
Fri Jan  7 20:18:33 2011
@@ -321,7 +321,7 @@ public final class WrapperClassGenerator
 
 
         List<Annotation> jaxbAnnos = getJaxbAnnos(mpi);
-        if (!addJAXBAnnotations(fv, jaxbAnnos)) {
+        if (!addJAXBAnnotations(fv, jaxbAnnos, name)) {
             AnnotationVisitor av0 = fv.visitAnnotation("Ljavax/xml/bind/annotation/XmlElement;",
true);
             av0.visit("name", name);
             if (factory.isWrapperPartQualified(mpi)) {
@@ -363,7 +363,9 @@ public final class WrapperClassGenerator
 
     }
      
-    private boolean addJAXBAnnotations(FieldVisitor fv, List<Annotation> jaxbAnnos)
{
+    private boolean addJAXBAnnotations(FieldVisitor fv,
+                                       List<Annotation> jaxbAnnos,
+                                       String name) {
         AnnotationVisitor av0;
         boolean addedEl = false;
         for (Annotation ann : jaxbAnnos) {
@@ -391,7 +393,11 @@ public final class WrapperClassGenerator
                 addedEl = true;   
                 XmlElement el = (XmlElement)ann;
                 av0 = fv.visitAnnotation("Ljavax/xml/bind/annotation/XmlElement;", true);
-                av0.visit("name", el.name());
+                if ("##default".equals(el.name())) {
+                    av0.visit("name", name);
+                } else {
+                    av0.visit("name", el.name());
+                }
                 av0.visit("nillable", el.nillable());
                 av0.visit("required", el.required());
                 av0.visit("namespace", el.namespace());



Mime
View raw message