You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Brad O'Hearne <br...@neurofire.com> on 2008/08/02 03:09:44 UTC

Somewhat OT: Data binding recommendations

I am curious -- setting aside the greater issue of how it fits into  
CXF for the moment, what is everyone's recommendation for XML-to- 
JavaBean data binding frameworks? What frameworks do you prefer over  
others and why? I have a particular need to assess data binding  
frameworks, and since that's a core part of what CXF does, I thought  
the list users would be a resource to ask.

Brad

Re: Somewhat OT: Data binding recommendations

Posted by Brad <br...@javawork.co.uk>.
Oh right. Well there you go, I learnt something today!

Thanks for the tip.

On Mon, Aug 4, 2008 at 11:52 AM, Ian Roberts <i....@dcs.shef.ac.uk> wrote:
> Brad wrote:
>>
>> Personally, I like XMLBeans. I prefer the XML first approach which it
>> seems to serve well. I've never had any problems with it (e.g.
>> unsupported document elements/structures) and although I'm sure its
>> not perfect that's a good enough reason for me to keep working with
>> it. Maybe I've just been lucky though?
>>
>> I've often thought of switching to a JAXB solution as standards are a
>> good thing but I'm wary of something that generates XML from java. It
>> just makes me think XML-RPC for some reason (always prefered
>> doc/literal). I'd be interested to hear someone jump in to argue the
>> case for JAXB though.
>
> JAXB supports the schema-first style as well.  CXF uses this capability for
> some of the Spring configuration classes (e.g. HTTPClientPolicy) which are
> generated from the schemas at build time.
>
> Ian
>
> --
> Ian Roberts               | Department of Computer Science
> i.roberts@dcs.shef.ac.uk  | University of Sheffield, UK
>

Re: Somewhat OT: Data binding recommendations

Posted by Ian Roberts <i....@dcs.shef.ac.uk>.
Brad wrote:
> Personally, I like XMLBeans. I prefer the XML first approach which it
> seems to serve well. I've never had any problems with it (e.g.
> unsupported document elements/structures) and although I'm sure its
> not perfect that's a good enough reason for me to keep working with
> it. Maybe I've just been lucky though?
> 
> I've often thought of switching to a JAXB solution as standards are a
> good thing but I'm wary of something that generates XML from java. It
> just makes me think XML-RPC for some reason (always prefered
> doc/literal). I'd be interested to hear someone jump in to argue the
> case for JAXB though.

JAXB supports the schema-first style as well.  CXF uses this capability 
for some of the Spring configuration classes (e.g. HTTPClientPolicy) 
which are generated from the schemas at build time.

Ian

-- 
Ian Roberts               | Department of Computer Science
i.roberts@dcs.shef.ac.uk  | University of Sheffield, UK

Re: Somewhat OT: Data binding recommendations

Posted by Brad <cf...@javawork.co.uk>.
Personally, I like XMLBeans. I prefer the XML first approach which it
seems to serve well. I've never had any problems with it (e.g.
unsupported document elements/structures) and although I'm sure its
not perfect that's a good enough reason for me to keep working with
it. Maybe I've just been lucky though?

I've often thought of switching to a JAXB solution as standards are a
good thing but I'm wary of something that generates XML from java. It
just makes me think XML-RPC for some reason (always prefered
doc/literal). I'd be interested to hear someone jump in to argue the
case for JAXB though.

On Sat, Aug 2, 2008 at 2:09 AM, Brad O'Hearne <br...@neurofire.com> wrote:
> I am curious -- setting aside the greater issue of how it fits into CXF for
> the moment, what is everyone's recommendation for XML-to-JavaBean data
> binding frameworks? What frameworks do you prefer over others and why? I
> have a particular need to assess data binding frameworks, and since that's a
> core part of what CXF does, I thought the list users would be a resource to
> ask.
>
> Brad
>

Re: Somewhat OT: Data binding recommendations

Posted by Daniel Kulp <dk...@apache.org>.
Well,  JAXB is by far the best supported in CXF considering that's what JAX-WS 
requires.   All the tooling is there, it's well tested, etc...   JAXB also 
is, in general, the fastest if perfomance is a super important metric.  

The main downside of JAXB compared to some other options for general XML use 
is that it IS a bit lossy.   Stuff it doesn't know about when parsing gets 
completely skipped/ignored.   Comments/Whitespace is discarded.  Etc...   
Thus, you cannot "round trip" xml through JAXB.

Dan


On Friday 01 August 2008 9:09:44 pm Brad O'Hearne wrote:
> I am curious -- setting aside the greater issue of how it fits into
> CXF for the moment, what is everyone's recommendation for XML-to-
> JavaBean data binding frameworks? What frameworks do you prefer over
> others and why? I have a particular need to assess data binding
> frameworks, and since that's a core part of what CXF does, I thought
> the list users would be a resource to ask.
>
> Brad



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