Note: Starting with release 1.2.9, Axiom requires Java 1.5. While the API is still compatible with Java 1.4, Axiom relies on classes from the Java 1.5 runtime environment. Some of its dependencies also require Java 1.5.
Highlights in this release:
Improved interoperability with StAX implementations other than Woodstox. Axiom now detects the StAX implementation that is used and works around interoperability issues. In particular, version 1.2.9 solves the longstanding concurrency issue that occurs when using Axiom with SJSXP.
Better control over XMLInputFactory and XMLOutputFactory settings. It is now possible to use property files to define application wide default settings for the StAX factories used by StAXUtils. It is also possible to specify a particular configuration when requesting a StAX parser from StAXUtils.
Improved XOP/MTOM handling. Axiom 1.2.9 is able to stream binary/base64 data in several situations where this was not possible previously. The behavior of Axiom 1.2.9 is also more consistent with respect to XOP encoded data sent to the application, solving some issues where attachments were processed incorrectly.
Improved documentation. There is now more and better Javadoc. Also, a user guide is available in HTML and as PDF.
Better OSGi support.
Improved consistency of the core interfaces. E.g. OMDocument now has a build method.
Resolved JIRA issues:
Prior to Axiom 1.2.9, OMAbstractFactory used system properties as defined in the following table to determine the factory implementations to use:
Object model | Method | System property | Default |
---|---|---|---|
Plain XML | getOMFactory() | om.factory | org.apache.axiom.om.impl.llom.factory.OMLinkedListImplFactory |
SOAP 1.1 | getSOAP11Factory() | soap11.factory | org.apache.axiom.soap.impl.llom.soap11.SOAP11Factory |
SOAP 1.2 | getSOAP12Factory() | soap12.factory | org.apache.axiom.soap.impl.llom.soap12.SOAP12Factory |
This in principle allowed to mix default factory implementations from different implementations of the Axiom API (e.g. an OMFactory from the LLOM implementation and SOAP factories from DOOM). This however doesn’t make sense. The system properties as described above are no longer supported in 1.2.9 and the default Axiom implementation is chosen using the new org.apache.axiom.om.OMMetaFactory system property. For LLOM, you should set:
org.apache.axiom.om.OMMetaFactory=org.apache.axiom.om.impl.llom.factory.OMLinkedListMetaFactory
This is the default and is equivalent to the defaults in 1.2.8. For DOOM, you should set:
org.apache.axiom.om.OMMetaFactory=org.apache.axiom.om.impl.dom.factory.OMDOMMetaFactory
In versions prior to 1.2.9, the XMLInputFactory and XMLOutputFactory instances returned by StAXUtils were mutable, i.e. it was possible to change the properties of these factories. This is obviously an issue since the factory instances are cached and can be shared among several thread. To avoid programming errors, starting from 1.2.9, the factories are immutable and any attempt to change their state will result in an IllegalStateException.
Note that the possibility to change the properties of these factories could be used to apply application wide settings. Starting with 1.2.9, Axiom has a proper mechanism to allow this. This feature is described in the user guide.
In Axiom 1.2.8, XMLStreamReader instances provided by Axiom could belong to one of three different categories:
XMLStreamReader instances delivering plain XML.
XMLStreamReader instances delivering plain XML and implementing a custom extension to retrieve optimized binary data.
XMLStreamReader instances representing XOP encoded data.
As explained in AXIOM-255 and AXIOM-122, in Axiom 1.2.8, the type of stream reader provided by the API was not always well defined. Sometimes the type of the stream reader even depended on the state of the Axiom tree (i.e. whether some part of it has been accessed or not).
In release 1.2.9 the behavior of Axiom was changed such that it never delivers XOP encoded data unless explicitly requested to do so. By default, any XMLStreamReader provided by Axiom now represents plain XML data and optionally implements the DataHandlerReader extension to retrieve optimized binary data. An XOP encoded stream can be requested from the getXOPEncodedStream method in XOPUtils.