Hi Minjal,
You are encountering the default derivation rules that JAXB applies to
the class name of the class to convert that name to an XML name used
as the element name.
Those rules are not random :-) and are specified by the JAXB JSR, i
tried to find a web page that also describes the rules but could not
find one.
You can specify name of the root element by declaring it in the
@XmlRootElement annotation:
http://java.sun.com/javase/6/docs/api/javax/xml/bind/annotation/XmlRootElement.html#name%28%29
for example:
@XmlRootElement(name="VSEsNATConfigResource")
public class VSEsNATConfigResource { ... }
Paul.
On Jul 30, 2009, at 1:49 PM, Minjal Shah wrote:
> Hi,
>
> I am developing an app using Jersey and its default servlet Grizzly.
> I have noticed that the XML_Tags that is the class-name, change
> their case randomly in the xml body.
>
> E.g :
> VSEListDHCPResource changes to vseListDHCPResource
> VSEsNATConfigResource changes to vsEsNATConfigResource
>
> Class Definition: public class VSEsNATConfigResource {
> XML Body on HTTP: <vsEsNATConfigResource>…. </vsEsNATConfigResource>
>
> Please explain why such a behavior?
>
> Thanks in advance.
> Minjal
>
>
> Love Cricket? Check out live scores, photos, video highlights and
> more. Click here.