[ https://issues.apache.org/jira/browse/XMLBEANS-141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Cezar Andrei closed XMLBEANS-141. --------------------------------- Resolution: Won't Fix This was fixed in 2.x, not enough time to backport it in 1.x line. > set methods ignored when xsi:nil=true > ------------------------------------- > > Key: XMLBEANS-141 > URL: https://issues.apache.org/jira/browse/XMLBEANS-141 > Project: XMLBeans > Issue Type: Bug > Affects Versions: Version 1.0.3, Version 1.0.4 > Environment: Win2K, sun jdk 1.4.2.07 > Reporter: Jeff Martin > Assignee: Radu Preotiuc-Pietro > Priority: Critical > > I have a dateTime in one of my schema objects. During processing, the > dateTime (hereafter known as enrollment date) has setNil() called on it > because it has no value. The text now looks like: > <vo:EnrolledOn xsi:nil="true" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/> > The problem comes when I want to assign a value, so I call: > subscription.setEnrolledOn(Calendar.getInstance()); > which yields the following representation: > <vo:EnrolledOn xsi:nil="true" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">2005-04-04T21:27:33.406-04:00</vo:EnrolledOn> > Which looks odd, since it has a value and has nil="true". The problem is when > I call subscription.getEnrolledOn(), I get null instead of the Calendar I set. > I did find a workaround in: > XmlDateTime xdt = XmlDateTime.Factory.newInstance(); > xdt.set(Calendar.getInstance()); > subscription.xsetEnrolledOn(xdt); > which yields the following representation: > <vo:EnrolledOn>2005-04-04T21:27:33.406-04:00</vo:EnrolledOn> > and subscription.getEnrolledOn() correctly returns a calendar. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]