dev@fi.java.net

Re: JAXB and of base64 data and FI

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Mon, 25 Jul 2005 16:45:32 -0700

Paul Sandoz wrote:
> Hi Kohsuke,
>
> If you have some time this can we investigate using the FI base64
> encoding algorithm to support the direct encoding/decoding of JAXB
> base64 encoded data bound to byte[].
>
> This is not quite as complex as full advanced integration of FI. JWSDP
> 1.6 supports direct encoding of bytes and it would be good to ensure
> that the first integration of FI in JAX-WS has the same functionality.
>
> I can see how one might implement this for serialization but and i
> little stuck on the best approach for parsing.

Sure, we can work on this.

A lot of details has slipped me since we talked about this last time.
But I believe all the relevant code are already in place.

There can be FiXmlOutput implementation, and then in the text method we
can look for the Base64Data object as a parameter.

Similarly we need an "FIConnector" class that fires event to XmlVisitor.
You can pass a Base64Data object to the text method for the raw binary data.

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.

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.


In the past we talked a lot about making those FIConnector/FIXmlOutput
super fast (such as index sharing etc), but I think your suggestion of
"let's have something that works and improve it over time" makes sense.

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com