You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Jacob Danner (JIRA)" <xm...@xml.apache.org> on 2005/04/14 01:07:28 UTC

[jira] Assigned: (XMLBEANS-141) set methods ignored when xsi:nil=true

     [ http://issues.apache.org/jira/browse/XMLBEANS-141?page=history ]

Jacob Danner reassigned XMLBEANS-141:
-------------------------------------

    Assign To: 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: Jacob Danner
>     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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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