| Summary: | XmlAnyElement produces duplicate namespace declarations when marshalling | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Rick Barkhouse <rick.barkhouse> |
| Component: | Eclipselink | Assignee: | Project Inbox <eclipselink.oxm-inbox> |
| Status: | CLOSED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |
Consider the following Java class / XML Bindings file: ===== @XmlRootElement public class CustomerAnno { @XmlAnyElement public Object anyElem; } ===== <java-types> <java-type name="Customer"> <xml-root-element /> <java-attributes> <xml-any-element java-attribute="anyElem" /> </java-attributes> </java-type> </java-types> ===== If a namespace-qualified Element is set on anyElem: anyElem = doc.createElementNS("any-element", "my-elem"); Annotations: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <customerAnno xmlns="http://www.example.org/package"> <my-elem:my-elem xmlns:my-elem="any-element" xmlns="any-element"/> </customerAnno> * Note duplicate declaration of 'any-element' XML Bindings: <?xml version="1.0" encoding="UTF-8"?> <ns0:customer xmlns:ns0="http://www.example.org/package"> <my-elem xmlns="any-element"/> </ns0:customer> * Note that this is not textually identical to the Annotations version