As far as I remember, the element must only ever appear as root element to
qualify as root element. If it ever appears as child to some other element
it can no longer get such annotation. I think I found that while reading
Kohsuke's posts in the archive.

https://web.archive.org/web/20160117210900/https://community.oracle.com/blogs/kohsuke/2006/03/03/why-does-jaxb-put-xmlrootelement-sometimes-not-always

On Fri, Oct 22, 2021, 15:40 Delany <delany.middle...@gmail.com> wrote:

> hi. Im cleaning up some old projects and I seem to have an issue with the
> jaxws-maven-plugin.
> To produce working code the wsimport goal must be followed by
> maven-jaxb2-plugin with forceRegenerate=true.
> It seems jaxws-maven-plugin can't annotate classes with @XmlRootElement and
> that's why maven-jaxb2-plugin must be run.
> Googling WSDL root xml element doesn't reveal much.
> Does this sound familiar?
>
> Thanks,
> Delany
>
> https://github.com/mojohaus/jaxws-maven-plugin/issues
> https://www.mojohaus.org/jaxws-maven-plugin/index.html
>

Reply via email to