We use Sun's JAXB implementation.  Almost certainly that is per the JAXB
specification.  The Sun Forum[1] may be of more help for you on JAXB.

Perhaps the reason for JAXBElement<type> is that will map to the Holder
class[2][3] in JAX-WS, which is an object that allows you to insert/read
NULL for a particular value.

Glen

[1] http://forums.java.net/jive/forum.jspa?forumID=46
[2] http://java.sun.com/javaee/5/docs/api/javax/xml/ws/Holder.html
[3] http://www.jroller.com/gmazza/date/20070929 (step #7)

Am Montag, den 07.04.2008, 15:33 -0600 schrieb Gerardo Blanco:
> Hi, 
> I used wsdl2java and it created several .java files. I noticed that nullable 
> elements are created as JAXBElement<type>, while non-nullable elements are 
> classes without JAXBElement wrappers (Integer, etc). 
>  
> What is the rationale behind this? Is there documentation on why this is 
> done, and what are the drawbacks of generating everything as unwrapped 
> classes?
>  
> Thanks.
> Jerry
> 
> ----------------------------------------------------------------------
> NOTICE: This email message is for the sole use of the intended recipient(s) 
> and may contain confidential and privileged information. Any unauthorized 
> review, use, disclosure or distribution is prohibited. If you are not the 
> intended recipient, please contact the sender by reply email and destroy all 
> copies of the original message.

Reply via email to