dev@fi.java.net

Re: JAXB and of base64 data and FI

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Tue, 26 Jul 2005 09:25:56 -0700

Paul Sandoz wrote:
>> For applications to pass the FI parser into JAXB through the JAXB API,
>> we can have FISource and FIResult class. We can extend them from
>> SAXSource/Result for compatibility with non FI-aware systems. We can
>> then code the JAXB RI so that it invokes those FIConnector and
>> FIXmlOutput instead of treating it as a regular SAXSource/Result.
>
> We already have FastInfosetSource [1] and FastInfosetResult [2], which
> is part of the FastInfoset.jar.

Excellent.

> One issue is that JAX-WS uses StAX so the FI StAX parser and serializer
> will be used. So the source and result are not really SAX based. This
> may make the returning of a Base64Data a little tricky as we go through
> a pull to push layer. To encode and decode such data we may need to
> operate closely with the StAX serializer and parser.
>
> For parsing we might need to do something at the level of the
> XMLStreamReaderToContentHandler or have something specific to FI related
> to StAX. Or can we have a FIStAXConnector?

OK, then we'll use the unmarshal method that takes XMLStreamReader to
pass in the FI StAX parser, then. The ordinary JAXB implementation will
use it just as a StAX parser, while the JAXB RI will recognize it as a
FI StAX parser.

>> If someone from the FI team can write those code, I can happy put them
>> into the JAXB CVS repository and modify our API implementation code to
>> hook them together.
>
> Are you just referring to the source/result or are you including the
> FIConnector and FIXmlOutput as well?

The latter. I was hoping that I don't have to do it :-)

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com