This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services and the fly likes what is the use of @XmlRootElement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "what is the use of @XmlRootElement " Watch "what is the use of @XmlRootElement " New topic

what is the use of @XmlRootElement

sudheer kiran
Ranch Hand

Joined: Jun 26, 2008
Posts: 237

hi i have created a webservice example.
soem articrafts created by swgen contains this what is the use of this annotation

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41073
Check out how the generated SOAP differs if you change its "name" attribute. The javax.xml.bind.annotation.XmlRootElement javadocs also have some examples and explanations.

Ping & DNS - my free Android networking tools app
It is sorta covered in the JavaRanch Style Guide.
subject: what is the use of @XmlRootElement
Similar Threads
JAX-WS2 dynamical creation of response wrapper bean Class
@WebParam with complex type
Understanding @XmlElementRef in JAXB
XML JAXB Serializable
jax-ws complex nested type is killing me