| Summary: | Namespaces on XmlElementRef marshalled incorrectly | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Rick Barkhouse <rick.barkhouse> | ||||||||||
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> | ||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P3 | CC: | blaise.doughan | ||||||||||
| Version: | unspecified | ||||||||||||
| Target Milestone: | --- | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | Windows XP | ||||||||||||
| Whiteboard: | |||||||||||||
| Attachments: |
|
||||||||||||
Created attachment 207105 [details]
Test Case reproducing the error
Seems related to the byte[] -- element is marshalled correctly if it is JAXBElement<String> Created attachment 207161 [details]
Patch - code changes
Created attachment 207162 [details]
Patch - test changes
Fixed in trunk and 2.3. Reopening is there is an additional problem. Created attachment 207239 [details]
Additional Patch
Fixed in trunk and 2.3. The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |
If an @XmlElementRef declares its own namespace, we are not marshalling the corresponding element's namespace information correctly. public class EchoByteArray { @XmlElementRef(name = "request", namespace = "http://missing-uri.org/", type = JAXBElement.class, required = false) protected JAXBElement<byte[]> request; } This class will get marshalled as: <?xml version="1.0" encoding="UTF-8"?> <EchoByteArray xmlns:ns0="http://missing-uri.org/"> <request>AAECBAg=</ns0:request> </EchoByteArray> Note 'ns0' on the closing tag, but not the opening tag.