Hi
On 10/06/13 20:06, Jimmy Royer wrote:
Hi,
My goal is to annotate the extra list container classes generated by JAXB
with the XMLElementWrapper annotation. That is, normally with JAXB, when
one generates Java classes from an element in XMLSchema that should be a
list, there will be one extra Java class that will act as a container to
the list. This container class can be eliminated with the
XMLElementWrapperannotation.
Within JAXB, from Java to XMLSchema, it is an easy thing with the said
annotation. From the other side, from XMLSchema to Java, it's harder, but
still possible with the help of plug-in such as
jaxb-xew-plugin<https://github.com/dmak/jaxb-xew-plugin>.
Is it possible for me to use the cxf-tools-wadlto-jaxrs tooling, and
generate Java classes from JAXB that would be annotated with the
XMLElementWrapper annotation? If not, what are my options? Which would be
best?
- Is it possible to override the XJC tool to actually use the one from
the jaxb-xew-plugin? <https://github.com/dmak/jaxb-xew-plugin>
- Should I skip the XJC generation from the cxf-tools-wadlto-jaxrs tool
and invoke the XJC from the jaxb-xew-plugin myself as a separate step after
WADL generation?
- What's the best integration point to control the JAXB generation
overall?
I'm looking at
https://github.com/davidfmatheson/jaxb-xew-plugin/blob/master/samples/jaxws-sample/pom.xml,
it appears that -Xxev arguments are passed in as -Xjc argument values,
and a wadl generator supports -Xjc arguments now, so assuming the XEV
plugin is loaded, it should work as expected, not sure 100%, but I guess
it should work, can you try please
Sergey
Thanks,
Jimmy Royer