Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 330853 - Missing "xmlns=''" when calling marshaller.marshal(JAXBElement e, @ XMLStreamWriter w, TypeMappingInfo m)
Summary: Missing "xmlns=''" when calling marshaller.marshal(JAXBElement e, @ XMLStream...
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: Matt MacIvor CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-22 15:48 EST by Matt MacIvor CLA
Modified: 2022-06-09 10:08 EDT (History)
0 users

See Also:


Attachments
Proposed Fix and Test Case (6.59 KB, patch)
2010-11-22 16:01 EST, Matt MacIvor CLA
no flags Details | Diff

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