cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <>
Subject Re: How to have JAXB SchemaCompiler generating code for schema elements
Date Wed, 24 Feb 2010 10:42:31 GMT
Now, the compiler takes care of elements with anonymous complex types, but ignores elements
referring to public complex types which probably makes sense but what does not make sense
is that when generating the types only in this latter case it omits the @XmlRootElement. 

It is probably not quite that straightforward but it's kind of limiting nonetheless, example,
code-first - to - wadl/wsdl -back to code does not produce the same result, in other words,
if we start from a source having types with @XmlRootElement the produced schema section will
have elements referring to public complex types and now when we try to get back to the code
we have types with no @XmlRootElements... Probably not a big deal for JAXRS-based services
given that users can configure a JAXBElementProvider use JAXBElement under the hood and for
real wadl-first cases we can recommend users doing elements  with anonymous types if needed.

Next question : when JAXBContext generates a schema, is it possible to configure it to optionally
use anonymoos types, may work ok for cases when types are not reused across multiple diff

cheers, Sergey
  ----- Original Message ----- 
  From: Sergey Beryozkin 
  Sent: Tuesday, February 23, 2010 5:02 PM
  Subject: How to have JAXB SchemaCompiler generating code for schema elements


  I've started working on the wadl-first code generation (well not quite the wadl-first one
yet...) and I'm using the code I've 'borrowed' from the DynamicClientFactory from cxf-rt-databinding-jaxb.
At the moment I can only see files corresponding to schema types being generated.
  How can I configure SchemaCompiler to generate the code for xs:elements ?

  thanks, Sergey
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message