When I generate my JAXB mappings, I use the <jaxb:globalBindings generateValueClass="false"> option in my binding configuration. This results in a separation of interfaces and implementation classes of my JAXB mapping, so I have a mypackage.jaxb.MyElement interface and a mypackage.jaxb.impl.MyElementImpl implementation class.
Now about the problems:
1) The Jaxb2Marshaller's supportsInternal() method checks, if the specified type contains a XmlRootElement - which is only present in the implementation, not in the interface. So I'm forced to use the mypackage.jaxb.impl.MyElementImpl class in my Endpoint instead of using the interface mypackage.jaxb.MyElement. Bug or feature?
2) The contextPath check in the same method checks, if one of the specified contextPaths is exactly the same as the package of my JAXB element, which is not the case, because I have to specify the mypackage.jaxb package as the contextPath (because only this package contains the required ObjectFactory class) and the found type is in the mypackage.jaxb.impl package (because of problem 1).
I hope I could explain the problem - if you have any questions, let me know.