cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: JAXWS + JAXB + CXF's auto-wrapper feature
Date Fri, 30 Nov 2007 18:13:15 GMT

Just FYI:  the JAXWS spec specifically avoids any mention of having 
XmlRootElement on beans for the java first case, probably due to the 
issues you are seeing.   

The spec REALLY want's all the top level element names and such to be 
controlled with the JWS/JAXWS annotions and not the jaxb annotations.   
Thus, we need to use that information instead and more or less ignore 
the XmlRootElement annotation when we can.  

If the type has a XmlRootElement and an XmlType with a name attribute, 
we're kind of OK as the type is non-anonymous and we can point to it.   
However, if the type has no name attribute, it does blow things up 
pretty badly and is definitely outside the stuff the JAX-WS tck would be 
testing.

Dan


On Sunday 25 November 2007, Benson Margulies wrote:
> I have a little more information on this to offer.
>
> Leaving the current schema generation alone, I end up with a complex
> type containing two elements refs to the same element (one with
> maxOccurs and minOccurs).
>
> As an experiment, I fed this to wsdl2java, which told me that this was
> very sad and encouraged me to 'apply a customization to fix the
> names'.
>
> Well, OK, then, that would seem to favor my theory that auto-generated
> wrapper types should favor @WebParam names over XmlRootElement refs.



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog

Mime
View raw message