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

Bug 330853

Summary: Missing "xmlns=''" when calling marshaller.marshal(JAXBElement e, @ XMLStreamWriter w, TypeMappingInfo m)
Product: z_Archived Reporter: Matt MacIvor <matt.macivor>
Component: EclipselinkAssignee: Matt MacIvor <matt.macivor>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed Fix and Test Case none

Description Matt MacIvor CLA 2010-11-22 15:48:11 EST
Missing "xmlns=''" when calling marshaller.marshal(JAXBElement e, XMLStreamWriter w, TypeMappingInfo m). When we give a XMLStreamWriter to JAXB to write a XML tag under no namespace, JAXB may have to write a default namespace declaration of "xmlns=''".  Without this "xmlns=''", the tag may inherit a non-empty default namespace from it's ancestors causing the tag incorrectly namespace qualified. Fix suggestion: EclipseLinkJAXB may want to use xmlWriter.getNamespaceContext().getNamespaceURI("") or something similar to check if there is already a default namespace declared.
Comment 1 Matt MacIvor CLA 2010-11-22 16:01:20 EST
Created attachment 183601 [details]
Proposed Fix and Test Case
Comment 2 Matt MacIvor CLA 2010-11-23 15:17:48 EST
Attached patch checked in to SVN
Reviewed by David McCann
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:08:44 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink