Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333882 - Dynamic JAXB: Bootstrap from XSD fails with schema type "xs:base64Binary"
Summary: Dynamic JAXB: Bootstrap from XSD fails with schema type "xs:base64Binary"
Status: CLOSED 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: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-10 11:07 EST by Rick Barkhouse CLA
Modified: 2022-06-09 10:33 EDT (History)
0 users

See Also:


Attachments
Proposed patch. (20.95 KB, patch)
2011-01-18 16:13 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-01-10 11:07:40 EST
When attempting to bootstrap from the following XSD, the user will get the exception "JClass name byte[] contains illegal character [".

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="myNamespace" xmlns:myns="myNamespace" xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <xs:element name="person" type="myns:person"/>

    <xs:complexType name="person">
        <xs:sequence>
            <xs:element name="name" type="xs:string"/>
            <xs:element name="abyte" type="xs:byte"/>            
            <xs:element name="image" type="xs:base64Binary"/>            
        </xs:sequence>
    </xs:complexType>

</xs:schema>

The primitive byte[] that gets generated because of the base64 field is not interpreted properly.
Comment 1 Rick Barkhouse CLA 2011-01-18 16:13:17 EST
Created attachment 187045 [details]
Proposed patch.
Comment 2 Rick Barkhouse CLA 2011-01-19 11:02:52 EST
Fixed, reviewed by mmacivor.

New test cases:

DynamicJAXBFromOXMTestCases : testBinary()
DynamicJAXBFromXSDTestCases : testBinary()
DynamicJAXBFromXSDTestCases : testBinaryGlobalType()
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:15:04 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:33:50 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink