2 Replies Latest reply on Apr 22, 2010 4:01 PM by Viacheslav Garmash

    Generated classes having JAXB attributed Elements

    Zeeshan Javeed Newbie

      Hi All,

      Although its not very critical but I would like to be aware of the reason.
      if the class at server side has defind an attribute with xmlelement notation the generated class element is then of JAXBELEMENT.

       protected String sessionID = null;

      then the repectively generated class having attribute defined as

       @XmlElementRef(name = "sessionID", type = JAXBElement.class)
       protected JAXBElement<String> sessionID;

      My question is , Notations are ok but why object is of type JAXBElement. If I remove @XmlElement(nillable=true) notation from server class, then created object is of simple java type, String.

      Any reason and clue to get simple java object while keeping the notation ?