You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Dennis Sosnoski <dm...@sosnoski.com> on 2010/07/07 04:56:35 UTC

[JiBX DataBinding] Code generation API

I've restructured the JiBX code generation from schema to make it easier 
to use from other tools. Nilupa, you should be able to use this to 
integrate JiBX code and binding generation in with CXF's code generation 
from WSDL.

JiBX code generation still uses the org.jibx.schema.codegen.CodeGen 
class, but no longer assumes command line usage. The guts of the core 
generation have been moved into the static generate() method, which 
takes a pair of interfaces and a list of schema resolvers as input. The 
first interface is to provide code generation parameters, the second is 
to handle reporting of problems and status information during 
generation. The list of schema resolvers provides the means for the code 
generation to get at the actual schemas - in normal generation these are 
generally coming from the file system or internet and use 
org.jibx.schema.UrlResolver instances, but for working from WSDL you may 
need to work with embedded schemas which can be handled using 
org.jibx.schema.MemoryResolver.

It'll probably be next week before I can release JiBX 1.2.3 including 
these changes, but I've uploaded the latest SNAPSHOT jars to the maven1 
repository if you want to try them out. You can get the source code from 
the JiBX CVS on SourceForge.

  - Dennis

Re: [JiBX DataBinding] Code generation API

Posted by Dennis Sosnoski <dm...@sosnoski.com>.
Nilupa Bandara wrote:
>
> Quick clarification, the CodeGen.generate(..)[1] method is a private method.
> Is that intentional ?
>   

Nope. :-)  Corrected in CVS.

  - Dennis

Re: [JiBX DataBinding] Code generation API

Posted by Nilupa Bandara <ni...@gmail.com>.
On Wed, Jul 7, 2010 at 4:56 AM, Dennis Sosnoski <dm...@sosnoski.com> wrote:

> I've restructured the JiBX code generation from schema to make it easier to
> use from other tools. Nilupa, you should be able to use this to integrate
> JiBX code and binding generation in with CXF's code generation from WSDL.
>
> JiBX code generation still uses the org.jibx.schema.codegen.CodeGen class,
> but no longer assumes command line usage. The guts of the core generation
> have been moved into the static generate() method, which takes a pair of
> interfaces and a list of schema resolvers as input.


Quick clarification, the CodeGen.generate(..)[1] method is a private method.
Is that intentional ?

Nilupa

[1]
http://jibx.cvs.sourceforge.net/viewvc/jibx/core/build/src/org/jibx/schema/codegen/CodeGen.java?view=markup
(line
number: 1976)




> The first interface is to provide code generation parameters, the second is
> to handle reporting of problems and status information during generation.
> The list of schema resolvers provides the means for the code generation to
> get at the actual schemas - in normal generation these are generally coming
> from the file system or internet and use org.jibx.schema.UrlResolver
> instances, but for working from WSDL you may need to work with embedded
> schemas which can be handled using org.jibx.schema.MemoryResolver.
>
> It'll probably be next week before I can release JiBX 1.2.3 including these
> changes, but I've uploaded the latest SNAPSHOT jars to the maven1 repository
> if you want to try them out. You can get the source code from the JiBX CVS
> on SourceForge.
>
>  - Dennis
>



-- 
Nilupa Bandara

Re: [JiBX DataBinding] Code generation API

Posted by Nilupa Bandara <ni...@gmail.com>.
Thanks for making the API more user friendly. I will checkout the latest
from JiBX CVS repository.

Nilupa

On Wed, Jul 7, 2010 at 4:56 AM, Dennis Sosnoski <dm...@sosnoski.com> wrote:

> I've restructured the JiBX code generation from schema to make it easier to
> use from other tools. Nilupa, you should be able to use this to integrate
> JiBX code and binding generation in with CXF's code generation from WSDL.
>
> JiBX code generation still uses the org.jibx.schema.codegen.CodeGen class,
> but no longer assumes command line usage. The guts of the core generation
> have been moved into the static generate() method, which takes a pair of
> interfaces and a list of schema resolvers as input. The first interface is
> to provide code generation parameters, the second is to handle reporting of
> problems and status information during generation. The list of schema
> resolvers provides the means for the code generation to get at the actual
> schemas - in normal generation these are generally coming from the file
> system or internet and use org.jibx.schema.UrlResolver instances, but for
> working from WSDL you may need to work with embedded schemas which can be
> handled using org.jibx.schema.MemoryResolver.
>
> It'll probably be next week before I can release JiBX 1.2.3 including these
> changes, but I've uploaded the latest SNAPSHOT jars to the maven1 repository
> if you want to try them out. You can get the source code from the JiBX CVS
> on SourceForge.
>
>  - Dennis
>



-- 
Nilupa Bandara