You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Ajith Ranabahu <aj...@gmail.com> on 2004/12/15 13:26:21 UTC
[Axis2] Improved serialiser
Hi all,
I made some improvements to the serialiser so that it has flexibility.
Now the serialiser takes in a XMLStreamWriter object and writes to it
(not the output stream).
One apparent advantage of this approach to me is that the serialiser
stays the same when the output form needs to be changed. A different
implementation of a XMLStreamWriter can be passed to the serialiser so
that it produces the necessary output.
The major changes were done to the following classes
org.apache.axis.impl.llom.serialize.SimpleOMSerializer
org.apache.axis.impl.llom.serialize.StreamingOMSerializer
thoughts ?
--
Ajith Ranabahu
Re: [Axis2] Improved serialiser
Posted by Aleksander Slominski <as...@cs.indiana.edu>.
Ajith Ranabahu wrote:
>Yep you are quite right there. XMLStreamWriter can have many
>implementations but what it has is a set of methods such as
>writeStartElement, WriteCharacters and so on. We have to have an
>someone sitting in the middle calling the correct methods of the
>streamwriter according to whatever the events.
>
>Is it not?
>
>
there are two options: element )or factory) knows how to serialize
element and/or user can provide their own algorithms.
this is especially important wen doing conversion of Java types into XML
Infoset (so if OM element child is binary object it is serialized as
BASE64 not toString()).
alek
>
>On Wed, 15 Dec 2004 14:00:20 -0500, Aleksander Slominski
><as...@cs.indiana.edu> wrote:
>
>
>>Ajith Ranabahu wrote:
>>
>>
>>
>>>Hi all,
>>>I made some improvements to the serialiser so that it has flexibility.
>>>Now the serialiser takes in a XMLStreamWriter object and writes to it
>>>(not the output stream).
>>>One apparent advantage of this approach to me is that the serialiser
>>>stays the same when the output form needs to be changed. A different
>>>implementation of a XMLStreamWriter can be passed to the serialiser so
>>>that it produces the necessary output
>>>
>>>
>>>
>>that looks like duplicate layers of abstraction: AFAIR
>>StAX::XMLStreamWriter is interface and there can be many implementations
>>of it.
>>
>>
>>
>>>.
>>>The major changes were done to the following classes
>>>org.apache.axis.impl.llom.serialize.SimpleOMSerializer
>>>org.apache.axis.impl.llom.serialize.StreamingOMSerializer
>>>
>>>
>>>
>>>
>>>
>>what OMSerializer provides that StAX::XMLStreamWriter does not have?
>>
>>alek
>>
>>--
>>The best way to predict the future is to invent it - Alan Kay
>>
>>
>>
>>
>
>
>
>
--
The best way to predict the future is to invent it - Alan Kay
Re: [Axis2] Improved serialiser
Posted by Ajith Ranabahu <aj...@gmail.com>.
Yep you are quite right there. XMLStreamWriter can have many
implementations but what it has is a set of methods such as
writeStartElement, WriteCharacters and so on. We have to have an
someone sitting in the middle calling the correct methods of the
streamwriter according to whatever the events.
Is it not?
On Wed, 15 Dec 2004 14:00:20 -0500, Aleksander Slominski
<as...@cs.indiana.edu> wrote:
> Ajith Ranabahu wrote:
>
> >Hi all,
> >I made some improvements to the serialiser so that it has flexibility.
> >Now the serialiser takes in a XMLStreamWriter object and writes to it
> >(not the output stream).
> >One apparent advantage of this approach to me is that the serialiser
> >stays the same when the output form needs to be changed. A different
> >implementation of a XMLStreamWriter can be passed to the serialiser so
> >that it produces the necessary output
> >
> that looks like duplicate layers of abstraction: AFAIR
> StAX::XMLStreamWriter is interface and there can be many implementations
> of it.
>
> >.
> >The major changes were done to the following classes
> > org.apache.axis.impl.llom.serialize.SimpleOMSerializer
> > org.apache.axis.impl.llom.serialize.StreamingOMSerializer
> >
> >
> >
> what OMSerializer provides that StAX::XMLStreamWriter does not have?
>
> alek
>
> --
> The best way to predict the future is to invent it - Alan Kay
>
>
--
Ajith Ranabahu
Re: [Axis2] Improved serialiser
Posted by Aleksander Slominski <as...@cs.indiana.edu>.
Ajith Ranabahu wrote:
>Hi all,
>I made some improvements to the serialiser so that it has flexibility.
>Now the serialiser takes in a XMLStreamWriter object and writes to it
>(not the output stream).
>One apparent advantage of this approach to me is that the serialiser
>stays the same when the output form needs to be changed. A different
>implementation of a XMLStreamWriter can be passed to the serialiser so
>that it produces the necessary output
>
that looks like duplicate layers of abstraction: AFAIR
StAX::XMLStreamWriter is interface and there can be many implementations
of it.
>.
>The major changes were done to the following classes
> org.apache.axis.impl.llom.serialize.SimpleOMSerializer
> org.apache.axis.impl.llom.serialize.StreamingOMSerializer
>
>
>
what OMSerializer provides that StAX::XMLStreamWriter does not have?
alek
--
The best way to predict the future is to invent it - Alan Kay