Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 336279

Summary: MARSHALL OF "GMONTH" SCHEMA TYPE FROM XMLGREGORIANCALENDAR INCORRECT
Product: z_Archived Reporter: Rick Barkhouse <rick.barkhouse>
Component: EclipselinkAssignee: Rick Barkhouse <rick.barkhouse>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed patch.
none
Additional patch. none

Description Rick Barkhouse CLA 2011-02-03 15:02:09 EST
Given a class as such:

public class MyCal {
    
@javax.xml.bind.annotation.XmlSchemaType(namespace="http://www.w3.org/2001/XMLSchema", name="gMonth")
    public XMLGregorianCalendar cal;
}

the data is marshalled incorrectly an an unmarshall exception occurs on the
receiving end.  The Sun JAXB appears to do it correctly, see analysis below
and the simple code shown in testcase details. 

Eclipselink JAXB
<?xml version="1.0" encoding="UTF-8"?>
<ns0:CalendarTest
xmlns:ns0="http://marshalltestservice.org/types2"><cal>--05Z</cal></ns0:CalendarTest>

Sun JAXB
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ns2:CalendarTest
xmlns:ns2="http://marshalltestservice.org/types2"><cal>--05--Z</cal></ns2:CalendarTest>

Note the Eclipselink JAXB is missing trailing dashes, leading to this
unmarshall exception:
Comment 1 Rick Barkhouse CLA 2011-02-03 15:03:18 EST
Created attachment 188268 [details]
Proposed patch.
Comment 2 Rick Barkhouse CLA 2011-02-03 16:07:55 EST
Fixed, reviewed by bdoughan.
Comment 3 Rick Barkhouse CLA 2011-02-08 15:50:44 EST
Reopened due to additional unmarshalling and SDO errors.
Comment 4 Rick Barkhouse CLA 2011-02-08 15:54:11 EST
Created attachment 188548 [details]
Additional patch.
Comment 5 Rick Barkhouse CLA 2011-02-11 13:21:42 EST
Fixed.
Comment 6 Eclipse Webmaster CLA 2022-06-09 10:02:37 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 7 Eclipse Webmaster CLA 2022-06-09 10:10:56 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink