dev@fi.java.net

Re: JAXB Hook for FI

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 11 May 2005 11:48:51 +0200

Kohsuke Kawaguchi wrote:
> Paul Sandoz wrote:
>
>> One of the general problems we will have to tackle is the push me pull
>> me creature that is JAX-RPC + JAXB. JAX-RPC processing of SOAP
>> messages is done using a pull model. I could write a rather odd parser
>> that allows for a pull model via StAX for JAX-RPC to process the SOAP
>> message infoset and a push model for JAXB to process the content of
>> the SOAP message (header blocks, body and fault detail children).
>
>
> When the JAXB RI accepts a StAX parser as an input, we internally run
> the 'message pump' that peeks the next event and send it into this
> interface. I think this is easier to manage, rather than to mix pull and
> push both into the same FI parser class. Any reason why this isn't
> desirable?
>

Just that i do not like addition layers :-) plus i am also finding that
the FI StAX implementation is slower than the FI SAX implementation, i
do not know the precise reason but think it is because there is better
hotspot optimization because SAX controls the loop.

We would also have to make sure that the optimized data gets passed
through correctly.


> On a different note, I added IntArrayData. This can be passed to
> XmlVisitor.text.
>

OK.

I see you have written a conversion routine to characters. The code for
the builtin encoding algorithms has conversion to text, i am wondering
if we can reuse this code.


> One thing the current XmlVisitor doesn't do well is the attributes. It
> relies on SAX's definition, so we can only pass String, not
> CharSequence. This has been OK for the MTOM support, but I guess it's
> not good for FI. Should I be changing this to something else?
>

FI supports an extended interface to get access to optimized data. So it
  would be necessary to cast to this interface and check if there is
optimized data present.

Paul.

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109