JAXB (JSR-222) does not provide a means to control where namespace declarations occur. JAXB providers tend to put the namespaces on the root element (for performance reasons), but they are not required to.
Below is a link to an answer I gave to a similar question where XMLStreamWriter
is extended to control when the namespace declarations get reported.