users@jaxb.java.net

Re: 2nd try: Avoid both JAXB2 binding as well DOM creation for a document fragment?

From: Andreas Loew <Andreas.Loew_at_Sun.COM>
Date: Sat, 26 May 2007 00:04:20 +0200

Jitu, All,

Jitendra Kotamraju schrieb:
> Have you tried using Provider<Source> where there is no data binding
> involved.
>
> Other option is to use Provider<Message> in case you want to deal with
> headers etc.

thank you - yes, I know about the Provider and Dispatcher APIs. Still,
my intenion was to use a JAXB2 mapping for the "outer" part of my
document (i.e. *not* having to completely parse it on my own using e.g.
the StAX API).

In some ways, what I'd like to do reminds myself of the proverb and the
inherent contradiction of "Having your cake and eating it, too" (hoping
that this one is the right English language equivalent for the German
"Wasch mich, aber mach mich nicht naß": let me have a wash without
becoming wet).

What I am looking for is the ease of use and flexibility of a JAXB2
binding for the outer part of the document on the one hand, while still
enjoying the performance and streaming options of directly accessing the
nested inner document fragment (the "xsd:any" part of the outer
XSD/WSDL) using the original StAX streaming source on the other hand.

Looks like this will remain an irresolvable contradiction... :-(

Thanks anyway,

Andreas

-- 
Andreas Loew
Java Architect
Sun Microsystems (Germany)