Class SaajStaxWriter

  • All Implemented Interfaces:
    XMLStreamWriter

    public class SaajStaxWriter
    extends Object
    implements XMLStreamWriter
    SaajStaxWriter builds a SAAJ SOAPMessage by using XMLStreamWriter interface.

    Defers creation of SOAPElement until all the aspects of the name of the element are known. In some cases, the namespace uri is indicated only by the writeNamespace(String, String) call. After opening an element (writeStartElement, writeEmptyElement methods), all attributes and namespace assignments are retained within SaajStaxWriter.DeferredElement object (deferredElement field). As soon as any other method than writeAttribute, writeNamespace, writeDefaultNamespace or setNamespace is called, the contents of deferredElement is transformed into new SOAPElement (which is appropriately inserted into the SOAPMessage under construction). This mechanism is necessary to fix JDK-8159058 issue.

    Author:
    [email protected]