Author: dims
Date: Mon Jul 10 03:30:54 2006
New Revision: 420482

URL: http://svn.apache.org/viewvc?rev=420482&view=rev
Log:
fix for WSCOMMONS-48 - Nillable attributes are not serialized

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

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaElement.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaElement.java?rev=420482&r1=420481&r2=420482&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaElement.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaElement.java
 Mon Jul 10 03:30:54 2006
@@ -239,6 +239,9 @@
 
         if (maxOccurs != 1)
             xml += "maxOccurs=\"" + maxOccurs + "\" ";
+        
+        if (isNillable)
+          xml += "nillable=\"" + isNillable + "\" ";
 
         xml += ">\n";
 

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaSerializer.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaSerializer.java?rev=420482&r1=420481&r2=420482&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaSerializer.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/org/apache/ws/commons/schema/XmlSchemaSerializer.java
 Mon Jul 10 03:30:54 2006
@@ -612,6 +612,9 @@
                 serializedEl.appendChild(constraint);
             }
         }
+        if (elementObj.isNillable) {
+               serializedEl.setAttribute("nillable", "true");
+        }
 
         return serializedEl;
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to