cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yoav Abrahami <yoa...@gmail.com>
Subject Re: Suggestion to integrate J2XB into CXF
Date Wed, 14 Oct 2009 10:04:19 GMT
Hi Daniel,
Thanks for the long answer.

As for JAXB - my understanding and my brief experience with JAXB 2 was that
is does supports features such as substitution groups and a lot of other
interesting features at the price of constraining how to write the Java
code.

For instance, I can take the Union example. To my understanding, in JAXB 2,
the generated XML schema does not include a union simple type - you need to
modify the generated XML schema manually (see the article at
http://weblogs.java.net/blog/kohsuke/archive/2006/03/handling_union.html).
J2XB solves the same problem using declarative annotations including full
XML Schema generation (see the section 'Atomic Inheritance and XML Union'
at http://j2xb.sourceforge.net/inheritence.html)

As for the support for factories and constructors, a detailed explanation is
at http://j2xb.sourceforge.net/Constructors%20and%20Factories.html


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).


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/main/java/org/apache/cxf/xmlbeans/
> or the SDO databinging:
>
> http://svn.apache.org/repos/asf//cxf/trunk/rt/databinding/sdo/src/main/java/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
>

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