Skip to content

An implementation of AbstractJaxb2HttpMessageConverter that can work with EclipseLink MOXy external binding definitions [SPR-9758] #14392

@spring-projects-issues

Description

@spring-projects-issues

Michał Politowski opened SPR-9758 and commented

EclipseLink MOXy supports defining the bindings in an external definitions file instead of using annotations. The currently available Jaxb2RootElementHttpMessageConverter cannot be used when this feature is used, for two reasons:

  1. the JAXB context is created by the converter using the JAXBContext.newInstance(Class...) method. To use the external definition files with MOXy a context property must be specified using the newInstance variant taking a map;
  2. the converter decides if it can read/write an object by looking for an @XmlRootElement annotation, which will be absent for bindings defined completely externally.

A variant of the converter that eg. lets the user provide ready JAXB contexts for certain classes and assumes these classes are thus supported no matter what the annotations say could solve both problems.


Affects: 3.1 GA

Issue Links:

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions