Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336279 - MARSHALL OF "GMONTH" SCHEMA TYPE FROM XMLGREGORIANCALENDAR INCORRECT
Summary: MARSHALL OF "GMONTH" SCHEMA TYPE FROM XMLGREGORIANCALENDAR INCORRECT
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Rick Barkhouse CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-03 15:02 EST by Rick Barkhouse CLA
Modified: 2022-06-09 10:10 EDT (History)
0 users

See Also:


Attachments
Proposed patch. (3.87 KB, patch)
2011-02-03 15:03 EST, Rick Barkhouse CLA
no flags Details | Diff
Additional patch. (15.74 KB, patch)
2011-02-08 15:54 EST, Rick Barkhouse CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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