Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 367890 - [Validation] Improper validation for XmlElement with type specified alongside XmlJavaTypeAdapter
Summary: [Validation] Improper validation for XmlElement with type specified alongside...
Status: VERIFIED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: JAXB (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.2 M5   Edit
Assignee: Paul Fullbright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-04 15:29 EST by Paul Fullbright CLA
Modified: 2012-01-26 14:36 EST (History)
3 users (show)

See Also:


Attachments
Test project with schema and xml bindings file and pre-generated source code. (8.47 KB, application/x-zip-compressed)
2012-01-04 15:29 EST, Paul Fullbright CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Fullbright CLA 2012-01-04 15:29:07 EST
Created attachment 209035 [details]
Test project with schema and xml bindings file and pre-generated source code.

The attached project will explain somewhat, but the situation is this.

    @XmlElement(type = String.class)
    @XmlJavaTypeAdapter(Adapter1 .class)
    @XmlSchemaType(name = "dateTime")
    protected Calendar date;

This is causing an invalid validation error: "XML element type must be a sub-type of 'java.util.Calendar'."

The type String should refer to the type as it leaves the adapter but before it is marshalled, not the actual type of the field.

(There is another error, but should probably be fixed in the natural course of addressing the other error.)
Comment 1 Paul Fullbright CLA 2012-01-18 18:53:59 EST
fixed in 3.2 M5
Comment 2 Neil Hauge CLA 2012-01-19 09:29:57 EST
Shaun, is fixing this in head for M5 sufficient, or do you need a patch on 3.1?
Comment 3 Jolene Moffitt CLA 2012-01-26 14:36:25 EST
Verified in Build I-3.4.0-20120119095402 

Verified when you import the attached project and update the properties the validation errors do not appear.  See the link to view test steps for verification.  http://wiki.eclipse.org/Dali_3.2_M5