cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r661443 - /cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/WrapperClassGenerator.java
Date Thu, 29 May 2008 19:33:55 GMT
Author: dkulp
Date: Thu May 29 12:33:54 2008
New Revision: 661443

URL: http://svn.apache.org/viewvc?rev=661443&view=rev
Log:
[CXF-1598] Grab the qualification for the asm created wrapper beans from the schema.

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=661443&r1=661442&r2=661443&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
Thu May 29 12:33:54 2008
@@ -49,6 +49,7 @@
 import org.apache.cxf.service.model.MessageInfo;
 import org.apache.cxf.service.model.MessagePartInfo;
 import org.apache.cxf.service.model.OperationInfo;
+import org.apache.cxf.service.model.SchemaInfo;
 import org.apache.cxf.tools.common.ToolConstants;
 import org.objectweb.asm.AnnotationVisitor;
 import org.objectweb.asm.ClassWriter;
@@ -228,12 +229,16 @@
         cw.visit(Opcodes.V1_5, Opcodes.ACC_ABSTRACT + Opcodes.ACC_INTERFACE, classFileName,
null,
                  "java/lang/Object", null);
         
-        
+        boolean q = qualified;
+        SchemaInfo si = interfaceInfo.getService().getSchema(ns);
+        if (si != null) {
+            q = si.isElementFormQualified();
+        }
         AnnotationVisitor av0 = cw.visitAnnotation("Ljavax/xml/bind/annotation/XmlSchema;",
true);
         av0.visit("namespace", ns);
         av0.visitEnum("elementFormDefault",
                       getClassCode(XmlNsForm.class),
-                      qualified ? "QUALIFIED" : "UNQUALIFIED");
+                      q ? "QUALIFIED" : "UNQUALIFIED");
         av0.visitEnd();
         cw.visitEnd();
 



Mime
View raw message