Skip to content

Missing support for interface/implementation separated JAXB classes in Jaxb2Marshaller [SWS-372] #526

@gregturn

Description

@gregturn

Oliver Siegmar opened SWS-372 and commented

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.


Affects: 1.5.2

Metadata

Metadata

Assignees

Labels

status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions