Community
Participate
Working Groups
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.
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
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink