You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by am...@apache.org on 2008/03/16 05:10:52 UTC

svn commit: r637531 - /webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java

Author: amilas
Date: Sat Mar 15 21:10:51 2008
New Revision: 637531

URL: http://svn.apache.org/viewvc?rev=637531&view=rev
Log:
annotation element should comes as the first child

Modified:
    webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java

Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java?rev=637531&r1=637530&r2=637531&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java Sat Mar 15 21:10:51 2008
@@ -919,6 +919,12 @@
         if (complexTypeObj.id != null)
             serializedComplexType.setAttribute("id",
                     complexTypeObj.id);
+        
+        if (complexTypeObj.annotation != null) {
+            Element annotationEl = serializeAnnotation(doc,
+                    complexTypeObj.annotation, schema);
+            serializedComplexType.appendChild(annotationEl);
+        }
 
         if (complexTypeObj.contentModel instanceof XmlSchemaSimpleContent) {
             Element simpleContent = serializeSimpleContent(doc,
@@ -930,12 +936,6 @@
             Element complexContent = serializeComplexContent(doc,
                     (XmlSchemaComplexContent) complexTypeObj.contentModel, schema);
             serializedComplexType.appendChild(complexContent);
-        }
-
-        if (complexTypeObj.annotation != null) {
-            Element annotationEl = serializeAnnotation(doc,
-                    complexTypeObj.annotation, schema);
-            serializedComplexType.appendChild(annotationEl);
         }
 
         if (complexTypeObj.particle instanceof XmlSchemaSequence) {



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org