Arun Kumar,
try doing the following instead:
Calendar calendar = Calendar.getInstance();
calendar.clear(); // this clears the fields, including
Calendar.ZONE_OFFSET
calendar.set(Calendar.YEAR, 2008);
dateOfBirthType.setBirthYear(calendar);
- Wing Yew
________________________________
From: Arunkumar Dubagunta [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 13, 2007 4:19 PM
To: [email protected]
Subject: Help me to get proper value in generated XML fpr xs:gYear data
type
Hi,
I'm using XMLBeans to generate an XML for given XSD file.
The XSD has a field with data type XS:gYear.
The setter method has a convenience data type Calendar and I'm setting
the Calendar object.
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.YEAR,2008);
dateOfBirthType.setBirthYear(calendar);
The resultant XML is coming in the following
<DateOfBirth>
<BirthYear>2008-05:00</BirthYear>
</DateOfBirth>
I'm expecting the resultant XML to be
<DateOfBirth>
<BirthYear>2008</BirthYear>
</DateOfBirth>
Can somebody help me to oercome this issue?
Thanks,
Arun Kumar Dubagunta
________________________________
This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or
entity to which it is addressed. If the reader of this e-mail is
not the intended recipient or his or her authorized agent, the
reader is hereby notified that any dissemination, distribution or
copying of this e-mail is prohibited. If you have received this
e-mail in error, please notify the sender by replying to this
message and delete this e-mail immediately.
_______________________________________________________________________
Notice: This email message, together with any attachments, may contain
information of BEA Systems, Inc., its subsidiaries and affiliated
entities, that may be confidential, proprietary, copyrighted and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]