-
Notifications
You must be signed in to change notification settings - Fork 2
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
Substitue getters and setters are Lowercase #3
Comments
Are you able to create a simple test case for this scenario? I vaguely remember that I only transfer the element info throughout the post processing so whatever XJC spits out as bean property name would be driven by whatever is configured in your binding context. I have never seen the plugin lowercase anything and we used this plugin to generated tones of bindings. |
I seemingly fixed the issue: I created a pull request. |
here is the example of what I am doing and getting: https://github.com/bghost4/jaxb-substitution-example |
bump. Am I doing something wrong to cause this behavior? |
The reason your generated code does not run is because ALL extended classes (from substitution group) need to also be annotated with <jaxb:bindings xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:annox="http://annox.dev.java.net"
xmlns:substitution="http://jaxb2-commons.dev.java.net/basic/substitution"
jaxb:extensionBindingPrefixes="annox substitution"
jaxb:version="2.1">
<jaxb:bindings node="xsd:complexType[@name='CarType']">
<annox:annotate target="class">@javax.xml.bind.annotation.XmlRootElement(name="Car")</annox:annotate>
</jaxb:bindings>
</jaxb:bindings> Not sure exactly where that all goes in the gradle ecosystem (we use maven) but hope this helps. Tip: target the xsd types in the jaxb binding customisations as they are the ones that are used for class generation. If you try to target elements the XJC will fall over with some cryptic error. |
Thanks very much for the update |
* update project dependencies * bug fix #3 wrongly setting public element name to lower case
* update project dependencies * bug fix #3 wrongly setting public element name to lower case
* update project dependencies * bug fix #3 wrongly setting public element name to lower case
* update project dependencies * bug fix #3 wrongly setting public element name to lower case
for example if your class has a substitued field called feature the getter and setter for the field is getfeature and setfeature, instead of getFeature/setFeature
The text was updated successfully, but these errors were encountered: