Differences between revisions 8 and 9
Revision 8 as of 2004-09-26 16:30:05
Size: 2313
Editor: 203
Revision 9 as of 2009-09-20 22:47:34
Size: 2321
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 25: Line 25:
http://nagoya.apache.org/~dims/axis2/OMDiagrams/deserialization.GIF {{http://nagoya.apache.org/~dims/axis2/OMDiagrams/deserialization.GIF}}
Line 36: Line 36:
http://nagoya.apache.org/~dims/axis2/OMDiagrams/serialization.GIF {{http://nagoya.apache.org/~dims/axis2/OMDiagrams/serialization.GIF}}



This is a proposal for a Streaming API that the AXIOM implementation can use. The java source files are available in the scratch area here:


Mainly it has two interfaces. They are

  1. TypedXMLStreamReader
  2. TypedXMLStreamWriter


This is the streaming API, to be used by AXIOM implementation. It extends from two interfaces. i.e.

  1. javax.xml.stream.XMLStreamReader (StAX)
  2. org.apache.axis.xml.ContentComparable – This interface provides methods to compare the local names, prefixes and the attribute values with given String objects, without creating unnecessary String objects.

And the TypedXMLStreamReader has some more methods to access the xml content as java typed values. (Without creating unnecessary, intermediary immutable String objects) i.e. You can retrieve a xsd typed value as the appropriate java typed value. (e.g. xsd:int -> java:int, xsd:Base64 -> java:byte[], etc.,)

The TypedXMLStreamReader API can be used by the Deserializer. See the diagram below.


The OM Builder can use the javax.xml.stream.XMLStreamReader (standard StAX API) since it needs only Strings to create DOM like objects.


This is the xml push API, to be used by AXIOM implementation. It extends from javax.xml.stream.XMLStreamWriter interface. Similar to the above case the TypedXMLStreamWriter also has a set of methods to serialize java typed values as their appropriate xsd counterparts. (Without creating unnecessary, intermediary immutable String objects)

This can be used as the Stream Writer. See the diagram below.



We can implement a native implementation of the above interfaces and keep it as default. For that implementation we can use lxpp, which is an opensource implementation of lk.opensource.xml.parsers.TypedXMLPullParser and its components. (cvs.opensource.lk/lxpp)

And also we can write a general wrapper which can wrap any of the StAX implementation and provide the above API.

FrontPage/Architecture/OM/TypedXMLStream (last edited 2009-09-20 22:47:34 by localhost)