[jboss-user] [JBossWS] - Generated classes having JAXB attributed Elements

zeeshan.javeed do-not-reply at jboss.com
Thu Feb 14 08:34:12 EST 2008


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.


  |     @XmlElement(nillable=true)
  |     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 ?

Regards, 
Zeeshan.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4129390#4129390

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4129390



More information about the jboss-user mailing list