You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Sergey Beryozkin <sb...@progress.com> on 2010/02/23 18:02:59 UTC

How to have JAXB SchemaCompiler generating code for schema elements

Hi

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

Re: How to have JAXB SchemaCompiler generating code for schema elements

Posted by Sergey Beryozkin <sb...@progress.com>.
Hi Dan

This is useful, I may play with it later on, and the hint to do with causing anonymous types be created is something we can advise 
to code-first users...I needed classes created from element for wadl:representation/@element values be resolved easier but I also 
ended up creating a map of schema element names to type names which I'm using as a last resort to actually resolve 
wadl:representation/@element...

thanks, Sergey

----- Original Message ----- 
From: "Daniel Kulp" <dk...@apache.org>
To: <de...@cxf.apache.org>
Cc: "Sergey Beryozkin" <sb...@progress.com>
Sent: Wednesday, February 24, 2010 5:08 PM
Subject: Re: How to have JAXB SchemaCompiler generating code for schema elements



Since you are mucking in code, if you create a binding customization file that
has a jaxb:globalBindings element with generateElementClass="true" attribute,
it will generate a class for the element.  It's kind of an ugly class though
and possibly not really usable.

Dan


On Tue February 23 2010 12:02:59 pm Sergey Beryozkin wrote:
> Hi
>
> 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

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog 


Re: How to have JAXB SchemaCompiler generating code for schema elements

Posted by Daniel Kulp <dk...@apache.org>.
Since you are mucking in code, if you create a binding customization file that 
has a jaxb:globalBindings element with generateElementClass="true" attribute, 
it will generate a class for the element.  It's kind of an ugly class though 
and possibly not really usable.

Dan


On Tue February 23 2010 12:02:59 pm Sergey Beryozkin wrote:
> Hi
> 
> 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

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog