javaxmlfastinfoset

Getting hold of FastInfoset readers and writers


JDK 1.6 includes the capability for using FastInfoset web services via the JAX-WS API. The implementations of these are hidden deep inside com.sun.xml.internal, with package names designed to put the fear of god into any sensible java developer (e.g. com.sun.xml.internal.fastinfoset.stax.StAXDocumentParser (which implements XMLStreamReader) and com.sun.xml.internal.fastinfoset.stax.StAXDocumentSerializer (which implements XMLStreamWriter).

My understanding is that the use of these FastInfoset implementations is part of the internal JAX-WS content negotiation logic, and therefore not exposed to the public API. However, I want to make explicit use of the FastInfoset implementations, using their public STAX interfaces, and referably via a public factory class, rather than direct reference to these internal packages.

Does anyone know if this facility is available, perhaps via the standard STAX factories?


Solution

  • XMLInputFactory and XMLOutputFactory seem plausible.

    Each has three implementations in my environment, one of which is cxf (ruled-out), one from codehaus (ruled-out), the other is from the fast infoset package you are referring to.

    I found this using Eclipse "References", because the javadoc doesn't include the "Use" section.