[ http://issues.apache.org/jira/browse/XMLBEANS-141?page=all ]
Lawrence Jones reassigned XMLBEANS-141: --------------------------------------- Assign To: Rajiv Bala (was: Jacob Danner) > set methods ignored when xsi:nil=true > ------------------------------------- > > Key: XMLBEANS-141 > URL: http://issues.apache.org/jira/browse/XMLBEANS-141 > Project: XMLBeans > Type: Bug > Versions: Version 1.0.3, Version 1.0.4 > Environment: Win2K, sun jdk 1.4.2.07 > Reporter: Jeff Martin > Assignee: Rajiv Bala > 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. - 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]