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

Generating full path to @Element annotation #3

Merged
merged 1 commit into from
Jun 14, 2013

Conversation

4everalone
Copy link
Contributor

@bulldog2011
Copy link
Owner

Hi 4everalone:

Thx for your contribution!

I am thinking about adding some conditional logic in the template:
if dom element is imported, then use fully qualified @element annoation.

Will update the source and build a patch release tomorrow.

Thx!
-William

@bulldog2011 bulldog2011 merged commit 5780483 into bulldog2011:master Jun 14, 2013
@bulldog2011
Copy link
Owner

Hi 4everalone:

I have updated the source on master and done basic test, please have a check.

Thx!
-William

@4everalone
Copy link
Contributor Author

Thank you!

@bulldog2011
Copy link
Owner

Now both mxjc and mwsc zip packages have been re-built, you can download and have a try.

@4everalone
Copy link
Contributor Author

I've tried. The problem still exist but in other kind of nature. My wsdl contains a complex type called "Element", as a result generated class "Element" conflicts with @element annotation :)
You may say that your project will not support such situtation, but this is a real problem which require to be fixed. I know you trying to write a nice code, but seems choosen name for annotation was a bad idea.
so there is tree way to resolve this:

  1. Generate full path to annotation.
  2. Continue fixing name conflicts.
  3. Rename annotation.

As for me i'm choosing the first, because of not enough time.

I think you did a great job, please don't stop.

@bulldog2011
Copy link
Owner

Hi 4everalone:

Thanks for your suggestion!

I also found that the chosen name for annotations was ill-considered, depends on how many users have similar issue, I may rename the annotations in nano in next release, for example, add 'Nano' prefix to all annoations.

There is another option to resolve your issue, you can customize the class name generated by JAXB(on which mxjc built) using custom binding, see details here:
http://stackoverflow.com/questions/4793637/jaxb-how-to-change-xjc-generated-classes-names-when-attr-type-is-specified-in-x

Thx for your good feedback!
-William

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

Successfully merging this pull request may close these issues.

2 participants