Class EnvelopeImpl

java.lang.Object
com.sun.xml.messaging.saaj.soap.impl.ElementImpl
com.sun.xml.messaging.saaj.soap.impl.EnvelopeImpl
All Implemented Interfaces:
Envelope, LazyEnvelope, jakarta.xml.soap.Node, jakarta.xml.soap.SOAPBodyElement, jakarta.xml.soap.SOAPElement, jakarta.xml.soap.SOAPEnvelope, Element, Node
Direct Known Subclasses:
Envelope1_1Impl, Envelope1_2Impl

public abstract class EnvelopeImpl extends ElementImpl implements LazyEnvelope
Our implementation of the SOAP envelope.
Author:
Anil Vijendran (anil@sun.com)
  • Field Details

  • Constructor Details

    • EnvelopeImpl

      protected EnvelopeImpl(SOAPDocumentImpl ownerDoc, jakarta.xml.soap.Name name)
    • EnvelopeImpl

      protected EnvelopeImpl(SOAPDocumentImpl ownerDoc, QName name)
    • EnvelopeImpl

      protected EnvelopeImpl(SOAPDocumentImpl ownerDoc, NameImpl name, boolean createHeader, boolean createBody) throws jakarta.xml.soap.SOAPException
      Throws:
      jakarta.xml.soap.SOAPException
    • EnvelopeImpl

      public EnvelopeImpl(SOAPDocumentImpl ownerDoc, Element domElement)
  • Method Details

    • getHeaderName

      protected abstract NameImpl getHeaderName(String prefix)
    • getBodyName

      protected abstract NameImpl getBodyName(String prefix)
    • addHeader

      public jakarta.xml.soap.SOAPHeader addHeader() throws jakarta.xml.soap.SOAPException
      Specified by:
      addHeader in interface jakarta.xml.soap.SOAPEnvelope
      Throws:
      jakarta.xml.soap.SOAPException
    • addHeader

      public jakarta.xml.soap.SOAPHeader addHeader(String prefix) throws jakarta.xml.soap.SOAPException
      Throws:
      jakarta.xml.soap.SOAPException
    • lookForHeader

      protected void lookForHeader() throws jakarta.xml.soap.SOAPException
      Throws:
      jakarta.xml.soap.SOAPException
    • getHeader

      public jakarta.xml.soap.SOAPHeader getHeader() throws jakarta.xml.soap.SOAPException
      Specified by:
      getHeader in interface jakarta.xml.soap.SOAPEnvelope
      Throws:
      jakarta.xml.soap.SOAPException
    • lookForBody

      protected void lookForBody() throws jakarta.xml.soap.SOAPException
      Throws:
      jakarta.xml.soap.SOAPException
    • addBody

      public jakarta.xml.soap.SOAPBody addBody() throws jakarta.xml.soap.SOAPException
      Specified by:
      addBody in interface jakarta.xml.soap.SOAPEnvelope
      Throws:
      jakarta.xml.soap.SOAPException
    • addBody

      public jakarta.xml.soap.SOAPBody addBody(String prefix) throws jakarta.xml.soap.SOAPException
      Throws:
      jakarta.xml.soap.SOAPException
    • addElement

      protected jakarta.xml.soap.SOAPElement addElement(jakarta.xml.soap.Name name) throws jakarta.xml.soap.SOAPException
      Overrides:
      addElement in class ElementImpl
      Throws:
      jakarta.xml.soap.SOAPException
    • addElement

      protected jakarta.xml.soap.SOAPElement addElement(QName name) throws jakarta.xml.soap.SOAPException
      Overrides:
      addElement in class ElementImpl
      Throws:
      jakarta.xml.soap.SOAPException
    • getBody

      public jakarta.xml.soap.SOAPBody getBody() throws jakarta.xml.soap.SOAPException
      Specified by:
      getBody in interface jakarta.xml.soap.SOAPEnvelope
      Throws:
      jakarta.xml.soap.SOAPException
    • getContent

      public Source getContent()
      Description copied from interface: Envelope
      Get the content as a JAXP Source.
      Specified by:
      getContent in interface Envelope
      Returns:
      source
    • createName

      public jakarta.xml.soap.Name createName(String localName, String prefix, String uri) throws jakarta.xml.soap.SOAPException
      Specified by:
      createName in interface jakarta.xml.soap.SOAPEnvelope
      Throws:
      jakarta.xml.soap.SOAPException
    • createName

      public jakarta.xml.soap.Name createName(String localName, String uri) throws jakarta.xml.soap.SOAPException
      Specified by:
      createName in interface jakarta.xml.soap.SOAPEnvelope
      Throws:
      jakarta.xml.soap.SOAPException
    • createName

      public jakarta.xml.soap.Name createName(String localName) throws jakarta.xml.soap.SOAPException
      Specified by:
      createName in interface jakarta.xml.soap.SOAPEnvelope
      Throws:
      jakarta.xml.soap.SOAPException
    • setOmitXmlDecl

      public void setOmitXmlDecl(String value)
    • setXmlDecl

      public void setXmlDecl(String value)
    • setCharsetEncoding

      public void setCharsetEncoding(String value)
    • output

      public void output(OutputStream out) throws IOException
      Description copied from interface: Envelope
      Output the content.
      Specified by:
      output in interface Envelope
      Parameters:
      out - output stream.
      Throws:
      IOException - in case of an I/O error.
    • output

      public void output(OutputStream out, boolean isFastInfoset) throws IOException
      Serialize to FI if boolean parameter set.
      Specified by:
      output in interface Envelope
      Parameters:
      out - output stream
      isFastInfoset - true if it is fast infoset.
      Throws:
      IOException - in case of an I/O error.
    • setElementQName

      public jakarta.xml.soap.SOAPElement setElementQName(QName newName) throws jakarta.xml.soap.SOAPException
      Specified by:
      setElementQName in interface jakarta.xml.soap.SOAPElement
      Overrides:
      setElementQName in class ElementImpl
      Throws:
      jakarta.xml.soap.SOAPException
    • setStaxBridge

      public void setStaxBridge(StaxBridge bridge) throws jakarta.xml.soap.SOAPException
      Specified by:
      setStaxBridge in interface Envelope
      Throws:
      jakarta.xml.soap.SOAPException
    • getStaxBridge

      public StaxBridge getStaxBridge() throws jakarta.xml.soap.SOAPException
      Specified by:
      getStaxBridge in interface Envelope
      Throws:
      jakarta.xml.soap.SOAPException
    • getPayloadReader

      public XMLStreamReader getPayloadReader() throws jakarta.xml.soap.SOAPException
      Specified by:
      getPayloadReader in interface LazyEnvelope
      Throws:
      jakarta.xml.soap.SOAPException
    • writeTo

      public void writeTo(XMLStreamWriter writer) throws XMLStreamException, jakarta.xml.soap.SOAPException
      Specified by:
      writeTo in interface LazyEnvelope
      Throws:
      XMLStreamException
      jakarta.xml.soap.SOAPException
    • getPayloadQName

      public QName getPayloadQName() throws jakarta.xml.soap.SOAPException
      Description copied from interface: LazyEnvelope
      Retrieve payload qname without materializing its contents
      Specified by:
      getPayloadQName in interface LazyEnvelope
      Returns:
      QName
      Throws:
      jakarta.xml.soap.SOAPException - in case of an error
    • getPayloadAttributeValue

      public String getPayloadAttributeValue(String localName) throws jakarta.xml.soap.SOAPException
      Description copied from interface: LazyEnvelope
      Retrieve payload attribute value without materializing its contents
      Specified by:
      getPayloadAttributeValue in interface LazyEnvelope
      Parameters:
      localName - local name
      Returns:
      payload attribute value
      Throws:
      jakarta.xml.soap.SOAPException - in case of an error
    • getPayloadAttributeValue

      public String getPayloadAttributeValue(QName qName) throws jakarta.xml.soap.SOAPException
      Description copied from interface: LazyEnvelope
      Retrieve payload attribute value without materializing its contents
      Specified by:
      getPayloadAttributeValue in interface LazyEnvelope
      Parameters:
      qName - QName
      Returns:
      payload attribute value
      Throws:
      jakarta.xml.soap.SOAPException - in case of an error
    • isLazy

      public boolean isLazy()
      Specified by:
      isLazy in interface LazyEnvelope