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

Bug 333882

Summary: Dynamic JAXB: Bootstrap from XSD fails with schema type "xs:base64Binary"
Product: z_Archived Reporter: Rick Barkhouse <rick.barkhouse>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed patch. none

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