cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1056512 - in /cxf/branches/2.3.x-fixes: ./ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
Date Fri, 07 Jan 2011 21:12:53 GMT
Author: dkulp
Date: Fri Jan  7 21:12:53 2011
New Revision: 1056512

URL: http://svn.apache.org/viewvc?rev=1056512&view=rev
Log:
Merged revisions 1056487 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1056487 | dkulp | 2011-01-07 15:18:33 -0500 (Fri, 07 Jan 2011) | 1 line
  
  Make sure the WebParam name is used
........

Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.3.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java?rev=1056512&r1=1056511&r2=1056512&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
Fri Jan  7 21:12:53 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