Comments (6)
That is interesting catch. Certainly there is a bug in library, as it dot handle Java reserved word return
. Could you handle the situation by applying JAXB customization for this property?
from jaxb-xew-plugin.
Unfortunately, I cannot reproduce the issue. Are you using version 1.1 of the plugin? If yes, could you please provide more verbose XSD or create a small project that demonstrates the problem (based on any from samples
)? I am pretty sure that version 1.0 of plugin has certain problems.
I have added another Unit test in commit 5f0a6be, which shows that reserved Java words are processed correctly.
from jaxb-xew-plugin.
Thanks for creating pull request. I think I have clean idea about was is happening. Unfortunately it is not possible to determine that given type is used as root type, that is why the given candidate is removed. Additional check to be added should be the following:
- If candidate class was never substituted, it should not be removed (perhaps is root type).
In your case ListRequest
is empty, as described by XSD, and ListResponse
is gone :( So in your original bug report NotifyRequest
should be empty as expected, and NotifyResponse
is removed and causes a compilation error – am I right?
Log information:
[INFO] Candidates:
[DEBUG] Candidate found: org.jvnet.jax_ws_commons.test.ListResponse [private List<String> items]
[INFO] [!]: (default): org.jvnet.jax_ws_commons.test.ListResponse
[INFO] 1 candidate(s) being considered.
[INFO]
[INFO] Modifications:
[INFO] 0 modification(s) to original code.
[INFO]
[INFO] Deletions:
[INFO] Removing method org.jvnet.jax_ws_commons.test.ListResponse createListResponse() from org.jvnet.jax_ws_commons.test.ObjectFactory
[INFO] Removing class org.jvnet.jax_ws_commons.test.ListResponse from package org.jvnet.jax_ws_commons.test
[INFO] 2 deletion(s) from original code.
from jaxb-xew-plugin.
I'm not an author of the original bug report. I googled this bug because it's reproduced in my project. So I decided to attach SSCCE that illustrate original problem. My sample project is not the same as a original "notifyResponse" sample.
from jaxb-xew-plugin.
The problem is clear and there is in general no golden bullet solution. In principle certain types can be used as part of other types and as root types as well. To repliably fight against false deletions one should use -Xxew:exclude filename
(put fully qualified classes into that plain text file, separated by newline).
from jaxb-xew-plugin.
Ah, I found another problem: the documentation is not in line with code. v1.1 of the plugin requires -Xxew:excludeFile filename
, but it should fail in case the argument is not recognized.
from jaxb-xew-plugin.
Related Issues (20)
- ConcurrentModificationException w/ jaxb2-basics 0.13.1 HOT 7
- Generating Classes for cXML DTD HOT 1
- NoSuchMethodException thrown with maven-jaxb2-plugin >= 0.12.2 and schema contains annotation HOT 3
- Doesn't seem to work without jaxb-impl HOT 4
- Refs of Sequences from different namespace are not deleted from Factory class HOT 6
- Xew does not remove list in a multi episode compilation HOT 2
- Plugin not compatible with https://github.com/sabomichal/immutable-xjc HOT 2
- Element not selected as candidate HOT 1
- Issues with plugin - incompatible types HOT 2
- ObjectFactory does not compile because of incompatible generic Types HOT 5
- JDK11 Compatibility? JAXB > 2.3.x? HOT 7
- Classes are generated but not with List from Gradle HOT 1
- Usage with jaxb2-maven-plugin HOT 1
- Anonymous choice types with unbounded maxOccurs are completely removed from the model HOT 3
- Compatibility with Jaxb xjc v3.0.0 HOT 23
- Not seeing my collection type produced. HOT 1
- Using plugin from Eclipse HOT 1
- Run with Bazel HOT 2
- ObjectFactory compilation error for collection using complexType HOT 4
- Different behavior on linux/windows when wrapper element has same name as list element HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jaxb-xew-plugin.