[ 
http://issues.apache.org/jira/browse/WSCOMMONS-48?page=comments#action_12417817 
] 

Sébastien Arod commented on WSCOMMONS-48:
-----------------------------------------

I can't create a patch from current svn because the svn is not accessible.

However from the version 1.0.3

Adding 
        if (elementObj.isNillable) {
                serializedEl.setAttribute("nillable", "true");
        }
to XmlSchemaSerializer.serializeElement(Document doc, XmlSchemaElement 
elementObj,
                             XmlSchema schema) at line 617 seems to fix the bug.

I don't now if XmlSchemaElement.toString(String prefix, int tab) is used but I 
add :
if (isNillable)
          xml += "nillable=\"" + isNillable + "\" ";

at XmlSchemaElement.java line 243 to be sure


> Nillable attributes are not serialized
> --------------------------------------
>
>          Key: WSCOMMONS-48
>          URL: http://issues.apache.org/jira/browse/WSCOMMONS-48
>      Project: WS-Commons
>         Type: Bug

>   Components: XmlSchema
>     Reporter: Sébastien Arod
>     Priority: Critical

>
> XmlSchema.write() method doesn't serialize nillable attributes on <xs:element 
> > elements...
> XmlSchemaSerializer.serializeElement(Document doc, XmlSchemaElement 
> elementObj, XmlSchema schema) doesn't use the isNillable field of 
> XmlSchemaElement
> neither do XmlSchemaElement.toString(String prefix, int tab)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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

Reply via email to