cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: Suggestion to integrate J2XB into CXF
Date Fri, 16 Oct 2009 21:18:50 GMT
On Wed October 14 2009 6:04:19 am Yoav Abrahami wrote:
> As for integrating - J2XB currently uses an abstraction of the actual XML
> parser with current implementation for Axiom. Having another implementation
> over Stax is simple to do and actually something I am thinking of for
> reasons of performance (Stax is about 6 times faster compared to Axiom,
>  from my experience).
> 
> The same goes for XMLSchema generation - simple to have it in
> org.apache.XmlSchema objects.
> 
> If I am to build this integration, will you be willing to help with the CFX
> knowhow? (what are the integration points, how to configure CFX to use
>  J2XB, etc).

Yea.   I'd be fine with helping out.   It can easily be done either in CXF or 
in your code base.   CXF supports pluggable data bindings (we have some for 
JAXB, XMLBeans, SDO, Aegis, Source, Stax, etc..) so it could be a plugin that 
is download from your site or part of CXF, etc...

One "slight" issue will be to support this for the normal unwrapping modes, 
we'll probably need to abstract out the creation of the wrapper type from the 
JAXWS front end and stick it in to the databinding API somehow.   Right now, 
that stuff is more or less hardcoded for JAXB and to produce JAXB things.  Not 
a huge deal though.   Something that probably should be done anyway. 

Dan

 
> I think the main question is if there is need, if the ideas that J2XB
>  brings are interesting to the CFX community. J2XB itself has about 500
>  downloads over the last year, most are using it with the Axis 2
>  integration to generate XML Schema with facets. 500 may seem like a small
>  number, however, it does indicate need and considering there is no
>  promotion of the library at all.. (it is not listed in the Axis site)
> 
> Cheers,
>   Yoav
> 
> 
> <http://j2xb.sourceforge.net/Constructors%20and%20Factories.html>
> 
> On Mon, Oct 12, 2009 at 7:02 PM, Daniel Kulp <dkulp@apache.org> wrote:
> > On Mon October 12 2009 9:12:15 am Yoav Abrahami wrote:
> > > Hi all,
> > > I have been seeing the XFire and CXF projects mature of the last few
> >
> > years
> >
> > > and really like the approach. Great work guys.
> > >
> > > J2XB is an open source for Data Binding with some novel ideas.
> > > I have been running for some time trying to prove a point - that you
> > > can define a complete service interface in Java using only Java code
> > > and annotations.
> >
> > JAXB + JAX-WS already allows this.   :-)   We've been trying to prove the
> > same
> > point for quite some time.   :-)
> >
> > > A Service interface includes the WSDL generation including XML Schema
> > > generation with full facets supports, inheritance, customized structure
> > > mapping, etc.
> >
> > Again, JAXB + JAX-WS, although we can also do so with Aegis.
> >
> > > In addition, it has novel support for model classes which do not have
> > > default constructors and require the use of complex constructors or
> > > factories.
> >
> > Now that starts getting interesting.
> >
> > > The J2XB site is at http://j2xb.sourceforge.net/
> > >
> > > I am currently thinking about returning to the J2XB project to add
> > > additional novel ideas for adding comments and documentation to the
> > > generated WSDL and for complete interfaces inheritance support, as well
> >
> > as
> >
> > > thoughts about enabling a second mapping configuration alternative as
> > > XML instead of annotations.
> > >
> > >
> > > I am basically asking you guys two questions
> > > 1. Is there an interest in integrating J2XB 1.1 as it is now with
> > > Apache CFX?
> >
> > Well, I haven't seen any demand for it from CXF users specifically, but
> > it may
> > be valuable, possibly for J2XB users.   Having never followed J2XB at
> > all, I'm
> > not sure how valuable it would be to them.
> >
> > The main issue, looking at the javadoc API's, is that it seems to be
> > fairly "file based" and not really stream based, and definitely
> > preferrable Stax based.   That definitely will make it MUCH harder to
> > integrate into CXF. CXF pretty much uses Stax
> > (XMLStreamWriter/XMLStreamReader) things for pretty
> > much all interaction with the databinding layer.   If the databinding
> > supports
> > that, it's usually not hard to integrate into CXF.
> >
> > You could look at the XMLBeans databinding as an example:
> >
> >
> > http://svn.apache.org/repos/asf//cxf/trunk/rt/databinding/xmlbeans/src/ma
> >in/java/org/apache/cxf/xmlbeans/ or the SDO databinging:
> >
> > http://svn.apache.org/repos/asf//cxf/trunk/rt/databinding/sdo/src/main/ja
> >va/org/apache/cxf/sdo
> >
> > Particularly the DataWriterImpls and DataReaderImpls.
> >
> >
> > Likewise, for generating the Schemas to stick in the generated wsdl, we
> > would
> > need to generate into either:
> > 1) DOMs
> > 2) Stax (which we would then go to DOM)
> > 3) org.apache XmlSchema schema objects (eventually, the DOM's from above
> > go into this)
> >
> > > 2. Is there an interest in continuing the work of the J2XB project
> > > either as joining it or as taking the ideas (including the ones I am
> > > thinking
> >
> > of
> >
> > >  for J2XB 2.0) to existing frameworks in CFX?
> >
> > Having never heard of J2XB before, I really have no idea.  :-)
> >
> >
> > --
> > Daniel Kulp
> > dkulp@apache.org
> > http://www.dankulp.com/blog
> 

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

Mime
View raw message