You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Benson Margulies <bi...@basistech.com> on 2007/10/31 15:22:37 UTC

How to get xsd2java to plant an @XmlRootElement on a class?

To construct a test case, I need to set up a .XSD so that some element
in there gets an @XmlRootElement annotation.

Anybody know the recipe?


Re: How to get xsd2java to plant an @XmlRootElement on a class?

Posted by James Mao <ja...@iona.com>.
Hope 
http://weblogs.java.net/blog/kohsuke/archive/2006/03/why_does_jaxb_p.html
answer your questions


Regards,
James


> To construct a test case, I need to set up a .XSD so that some element
> in there gets an @XmlRootElement annotation.
>
> Anybody know the recipe?
>
>   

RE: How to get xsd2java to plant an @XmlRootElement on a class?

Posted by Benson Margulies <bi...@basistech.com>.
The question was, for what construct in the XML schema will xsd2java end
up with that annotation. The answer turns out to be for an element with
an anonymous complex type as its content.

> -----Original Message-----
> From: Glen Mazza [mailto:glen.mazza@verizon.net]
> Sent: Wednesday, October 31, 2007 11:15 AM
> To: cxf-dev@incubator.apache.org
> Subject: Re: How to get xsd2java to plant an @XmlRootElement on a
class?
> 
> I think that annotation is placed on Java classes only, not on XSD's.
> 
> Glen
> 
> Am Mittwoch, den 31.10.2007, 10:22 -0400 schrieb Benson Margulies:
> > To construct a test case, I need to set up a .XSD so that some
element
> > in there gets an @XmlRootElement annotation.
> >
> > Anybody know the recipe?
> >


Re: How to get xsd2java to plant an @XmlRootElement on a class?

Posted by Glen Mazza <gl...@verizon.net>.
I think that annotation is placed on Java classes only, not on XSD's.

Glen

Am Mittwoch, den 31.10.2007, 10:22 -0400 schrieb Benson Margulies:
> To construct a test case, I need to set up a .XSD so that some element
> in there gets an @XmlRootElement annotation.
> 
> Anybody know the recipe?
>