Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use custom XMLInputFactory and XMLOutputFactory for XML and AASX #53

Closed
kenwenzel opened this issue Dec 13, 2022 · 0 comments · Fixed by #62
Closed

Use custom XMLInputFactory and XMLOutputFactory for XML and AASX #53

kenwenzel opened this issue Dec 13, 2022 · 0 comments · Fixed by #62
Assignees
Labels

Comments

@kenwenzel
Copy link
Contributor

Currently the XmlSerializer and XmlDeserializer rely on the standard behavior of Jackson and in the end of the JRE to create instances for XMLInputFactory and XMLOutputFactory.

In some environments - for example within an OSGi container - it may be necessary to provide custom instances for XMLInputFactory and XMLOutputFactory because the JRE is not able to load them from an OSGi bundle.

To use custom instances it is currently required to create subclasses and overwrite the buildMapper methods and replicate the contained code.
I would suggest to extend the constructors for passing an instance of com.fasterxml.jackson.dataformat.xml.XmlFactory.

Also AASXSerializer and AASXDeserializer allow to pass custom instances of the XML (de)serializers but additionaly create a default instance as can be seen here:

private XmlDeserializer deserializer = new XmlDeserializer();

I'll prepare a PR for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants