| Summary: | Missing "xmlns=''" when calling marshaller.marshal(JAXBElement e, @ XMLStreamWriter w, TypeMappingInfo m) | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Matt MacIvor <matt.macivor> | ||||
| Component: | Eclipselink | Assignee: | Matt MacIvor <matt.macivor> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | ||||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 183601 [details]
Proposed Fix and Test Case
Attached patch checked in to SVN Reviewed by David McCann The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |
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.