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
JAXB SchemaBinding instruction is ignored #104
Comments
Hmmm - seems to have been reported on a different plugin as well: |
Tried with this copied test
This results in a class being generated with a package name derived from the targetNamespace and not from the schemaBinding instruction. |
Even though jaxb:schemaBindings are read, I see when I debug the plugin that this doesn't lead to any registrations of instances of "BISchemaBinding". This subsequently means that in the ClassSelector.getPackage() the lookup to get the configured package for a namespace yields nothing - but the default name created by the NameConverter. |
Further analysis shows that for the above test case the SchemaBindings is registered as a BIXPluginCustomization. It has all of the information as is specified in the xsd:appinfo - but it is created with the wrong type (I think). |
Another interesting link with respect to this issue: |
FYI: Found that http://cxf.apache.org/cxf-xjc-plugin.html (version 3.2.1) - does honor schemaBindings correctly. So these guys apparently have fixed the issue. |
Feel free to supply a Pull Request with an integration test here. |
I encountered this bug today. With the upcoming end-of-life of Java 8, I think this bug might become a bit more critical. |
I'm migrating a project to Java 9 and we're using external JAXB configuration using .xjb/.jbx files. What I'm seeing is that an external configuration file like this one:
Does not produce packages, classes as have been specified. What instead happens is that the package names and class names are only derived from information that is contained in the XSDs. As such the instructions in the binding file seem to be ignored. Mind you: when I make a syntax error on purpose in the binding file, the plugin actually does fail indicating that there is a problem in the binding file.
Am I missing something?
The text was updated successfully, but these errors were encountered: