cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benson Margulies" <bim2...@basistech.com>
Subject JAXWS + JAXB + CXF's auto-wrapper feature
Date Sun, 25 Nov 2007 16:05:36 GMT
As of a few days ago, we had a defect in JAXB+JAXWS for generated
wrappers in the case where one or more params are of class type with
XmlRootElement annotations. The concreteName in the MessagePartInfo
didn't agree with the XmlSchema. The result was that generated
Javascript based on the schema made XML that was rejected by the
DocLitInterceptor, which looks at the parts.
 
I pushed them closer together, and then discovered a further question or
problem.
 
When JAX-WS has @WebParam(name = "foo") 
 
but the XmlRootElement has no name (but has a namespace), the code was
creating XML schema with ref= to the global element for the
XmlRootElement. Which, of course, had a completely different QName than
then part which derived from the @WebParam.
 
I then fiddled ReflectionServiceFactoryBean to generate schema based on
the @WebParam. Essentially, I made it ignore the @XmlRootElement in this
case and just create a local element based on the type.
 
That make my Javascript get along with the interceptor, and looked very
nice and symmetrical to me. However, it broke the JRA tests, which seem
to really badly want the other behavior. What really confused me was
that the JRA code ends up expecting one less level of element in the XML
altogether.
 
So, I think that the problem here is that I need to suppress the
'isElement' flag in the message part info for the ordinary
auto-generation case so that whatever floated JRA's boat still works.
 
 

Mime
View raw message