inline,
cheers,
-- Chris

BTW: if you need to followup -- we should probably take the discussion
offline ;-)
([EMAIL PROTECTED])

On 10/3/05, Ashley Williams <[EMAIL PROTECTED]> wrote:
>
> <off-topic>
> At the moment I'm just looking at code gen so it's interesting that
> you recommend xmlbeans over jaxb -


xmlbeans is more feature rich and could be faster because it has a "lazy
loading" feature. That said, I've not used it -- although juxtaposed against
JAXB (at least the Sun implementation) I wish we had given it a go...

We went w/ JAXB because it is a standard. Unfortunately, it was a can of
worms as well...

The biggest warts;
1) JAXB generates an impl-specific class with the same name (ObjectFactory)
for every XSD you process. This can, and often will, cause conflicts. If you
have two XSDs that you process independently in the build and they generate
into the same package then the last one in will win. As you might imagine,
this is a big problem. Sure you can work around it by putting each XSD (and
all the XSDs it may chain in) into it's own namespace -- but then you get
massive duplication of generated code (if XSDs are shared -- i.e both A.xsdand
B.xsd include C.xsd.).

BTW: note that WSDL2Java doesn't have this issue. It generates a unique
names (based on the WSDL) for all classes it generates. I don't know what
xmlbeans does??

2) xjc dumps core often (at least for us). You have to kick the Stack size
up to get it somewhat stable. It's been quite problematic...

3) JAXB is way too verbose. It generates a boat load of classes to represent
an XSD. It could and should be much more terse. In fact, JAXB2 supposedly
corrects this. (But like I said, JAXB2 requires Java 1.5 -- which we cannot
yet use)

do you have any links that compare the two? I'd love to know about
> these warts.
>
> You're right about centering on something like wsdl, but
> I have to start somewhere!


I'd start w/ WSDL -- it's where you will eventually end up . ;-)

wsdl2java looks great, just the sort of thing that gives me
> confidence in Maven.
> <off-topic>
>
> On 3 Oct 2005, at 20:12, Chris Berry wrote:
>
> > <off-topic>
> > Hi Ashley,
> > FWIW, given that (it sounds like) you are at the beginnings of
> > hatching a
> > data model (or rather a "data-transfer-object" model) -- I would
> > highly
> > recommend using WSDLs as teh primary artifact over XSDs (since you
> > say this
> > is for web services). WSDLs are an IDL -- where XSDs are just a
> > part of the
> > picture (the arguments).
> >
> > JAXB2 can consume WSDLs, although it is not widely advertized. And
> > (AFAIK)
> > JAXB2 does not suffer from some of the glaring warts of JAXB1. But
> > keep in
> > mind JAXB2 requires JDK 1.5.
> >
> > I tend to use Axis' WSDL2Java to generate my "XML Beans" It works
> > against
> > all of the WSDLs/XSDs we've put to it. We had many issues w/ JAXB1.
> >
> > If I were looking only at XSD to Java code generators, I would
> > likely choose
> > XMLBeans over JAXB.
> >
> > Cheers,
> > -- Chris
> > </off-topic>
> >
> > On 10/3/05, Ashley Williams <[EMAIL PROTECTED]> wrote:
> >
> >>
> >> Thanks Chris, though I'm not doing anything so heavyweight! I'm just
> >> trying to put an end to
> >> the days where I have to roll my own java data model from xml.
> >>
> >> There is something going down for jaxb because I came across the
> >> following link:
> >> http://jira.codehaus.org/browse/MEV-71?page=all
> >> so I think that because of licensing issues I'm supposed to create my
> >> own artifact for jaxb
> >> using this pom and my downloaded xjc jar file.
> >>
> >> As for wsdl, not using it yet simply because there aren't 37 hours in
> >> a day to look at it, but it's
> >> definitely on my radar ;)
> >>
> >> Cheers
> >> AW
> >>
> >> On 3 Oct 2005, at 17:27, Chris Berry wrote:
> >>
> >>
> >>> Hi Ashley,
> >>> There may be a JAXB plugin that I'm unaware of ??
> >>> There is an Axis WSDL2Java plugin at 
> >>> mojo.codehaus.org<http://mojo.codehaus.org>
> <http://
> >>> mojo.codehaus.org <http://mojo.codehaus.org>>
> >>>
> >> <http://
> >>
> >>> mojo.codehaus.org <http://mojo.codehaus.org> <http://mojo.codehaus.org
> >>
> >>> .
> >>> I have also written a WSDL2Java plugin that actually just offloads
> >>> to an Ant
> >>> build file to do all of the work. You could easily canibalize my
> >>> work for
> >>> JAXB. (It's in JIRA) The steps are essentially the same.
> >>>
> >>> BTW: Are you using JAXB2 and WSDLs??
> >>> Cheers,
> >>> -- Chris
> >>>
> >>> On 10/3/05, Ashley Williams <[EMAIL PROTECTED]> wrote:
> >>>
> >>>
> >>>>
> >>>> I need to do some work with the java web services libraries,
> >>>> starting
> >>>> with some simple jaxb stuff so that I can generate my binding
> >>>> classes
> >>>> early on in the lifecycle. Is anything in development I can use,
> >>>> even
> >>>> if it means pulling code out of a svn repository?
> >>>>
> >>>> Thanks
> >>>> AW
> >>>>
> >>>> -------------------------------------------------------------------
> >>>> --
> >>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>> For additional commands, e-mail: [EMAIL PROTECTED]
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to