Class SOAPEnvelope

All Implemented Interfaces:
Serializable, Cloneable, Node, SOAPElement, SOAPEnvelope, Element, Node, NodeList

public class SOAPEnvelope extends MessageElement implements SOAPEnvelope
Implementation of a SOAP Envelope
See Also:
  • Field Details

    • log

      protected static org.apache.commons.logging.Log log
    • trailers

      public Vector trailers
    • messageType

      public String messageType
  • Constructor Details

  • Method Details

    • getMessageType

      public String getMessageType()
      Get the Message Type (REQUEST/RESPONSE)
      Returns:
      message type
    • setMessageType

      public void setMessageType(String messageType)
      Set the Message Type (REQUEST/RESPONSE)
      Parameters:
      messageType -
    • getBodyElements

      public Vector getBodyElements() throws AxisFault
      Get all the BodyElement's in the soap body
      Returns:
      vector with body elements
      Throws:
      AxisFault
    • getTrailers

      public Vector getTrailers()
      Return trailers
      Returns:
      vector of some type
    • getFirstBody

      public SOAPBodyElement getFirstBody() throws AxisFault
      Get the first BodyElement in the SOAP Body
      Returns:
      first Body Element
      Throws:
      AxisFault
    • getHeaders

      public Vector getHeaders() throws AxisFault
      Get Headers
      Returns:
      Vector containing Header's
      Throws:
      AxisFault
    • getHeadersByActor

      public Vector getHeadersByActor(ArrayList actors)
      Get all the headers targeted at a list of actors.
    • addHeader

      public void addHeader(SOAPHeaderElement hdr)
      Add a HeaderElement
      Parameters:
      hdr -
    • addBodyElement

      public void addBodyElement(SOAPBodyElement element)
      Add a SOAP Body Element
      Parameters:
      element -
    • removeHeaders

      public void removeHeaders()
      Remove all headers
    • setHeader

      public void setHeader(SOAPHeader hdr)
      Set the SOAP Header
      Parameters:
      hdr -
    • removeHeader

      public void removeHeader(SOAPHeaderElement hdr)
      Remove a Header Element from SOAP Header
      Parameters:
      hdr -
    • removeBody

      public void removeBody()
      Remove the SOAP Body
    • setBody

      public void setBody(SOAPBody body)
      Set the soap body
      Parameters:
      body -
    • removeBodyElement

      public void removeBodyElement(SOAPBodyElement element)
      Remove a Body Element from the soap body
      Parameters:
      element -
    • removeTrailer

      public void removeTrailer(MessageElement element)
      Remove an element from the trailer
      Parameters:
      element -
    • clearBody

      public void clearBody()
      clear the elements in the soap body
    • addTrailer

      public void addTrailer(MessageElement element)
      Add an element to the trailer
      Parameters:
      element -
    • getHeaderByName

      public SOAPHeaderElement getHeaderByName(String namespace, String localPart) throws AxisFault
      Get a header by name (always respecting the currently in-scope actors list)
      Throws:
      AxisFault
    • getHeaderByName

      public SOAPHeaderElement getHeaderByName(String namespace, String localPart, boolean accessAllHeaders) throws AxisFault
      Get a header by name, filtering for headers targeted at this engine depending on the accessAllHeaders parameter.
      Throws:
      AxisFault
    • getBodyByName

      public SOAPBodyElement getBodyByName(String namespace, String localPart) throws AxisFault
      Get a body element given its name
      Parameters:
      namespace -
      localPart -
      Returns:
      Throws:
      AxisFault
    • getHeadersByName

      public Enumeration getHeadersByName(String namespace, String localPart) throws AxisFault
      Get an enumeration of header elements given the namespace and localpart
      Parameters:
      namespace -
      localPart -
      Returns:
      Throws:
      AxisFault
    • getHeadersByName

      public Enumeration getHeadersByName(String namespace, String localPart, boolean accessAllHeaders) throws AxisFault
      Return an Enumeration of headers which match the given namespace and localPart. Depending on the value of the accessAllHeaders parameter, we will attempt to filter on the current engine's list of actors. !!! NOTE THAT RIGHT NOW WE ALWAYS ASSUME WE'RE THE "ULTIMATE DESTINATION" (i.e. we match on null actor). IF WE WANT TO FULLY SUPPORT INTERMEDIARIES WE'LL NEED TO FIX THIS.
      Throws:
      AxisFault
    • outputImpl

      public void outputImpl(SerializationContext context) throws Exception
      Should make SOAPSerializationException?
      Overrides:
      outputImpl in class MessageElement
      Parameters:
      context - destination.
      Throws:
      Exception - if something went wrong.
    • getSOAPConstants

      public SOAPConstants getSOAPConstants()
      Get the soap constants for this envelope
      Returns:
    • setSoapConstants

      public void setSoapConstants(SOAPConstants soapConstants)
      Set the soap constants for this envelope
      Parameters:
      soapConstants -
    • getSchemaVersion

      public SchemaVersion getSchemaVersion()
      Get the schema version for this envelope
      Returns:
    • setSchemaVersion

      public void setSchemaVersion(SchemaVersion schemaVersion)
      Set the schema version for this envelope
      Parameters:
      schemaVersion -
    • addBody

      public SOAPBody addBody() throws SOAPException
      Add a soap body if one does not exist
      Specified by:
      addBody in interface SOAPEnvelope
      Returns:
      Throws:
      SOAPException
    • addHeader

      public SOAPHeader addHeader() throws SOAPException
      Add a soap header if one does not exist
      Specified by:
      addHeader in interface SOAPEnvelope
      Returns:
      Throws:
      SOAPException
    • createName

      public Name createName(String localName) throws SOAPException
      create a Name given the local part
      Specified by:
      createName in interface SOAPEnvelope
      Parameters:
      localName -
      Returns:
      Throws:
      SOAPException
    • createName

      public Name createName(String localName, String prefix, String uri) throws SOAPException
      Create a name given local part, prefix and uri
      Specified by:
      createName in interface SOAPEnvelope
      Parameters:
      localName -
      prefix -
      uri -
      Returns:
      Throws:
      SOAPException
    • getBody

      public SOAPBody getBody() throws SOAPException
      Get the soap body
      Specified by:
      getBody in interface SOAPEnvelope
      Returns:
      Throws:
      SOAPException
    • getHeader

      public SOAPHeader getHeader() throws SOAPException
      Get the soap header
      Specified by:
      getHeader in interface SOAPEnvelope
      Returns:
      Throws:
      SOAPException
    • setSAAJEncodingCompliance

      public void setSAAJEncodingCompliance(boolean comply)
    • removeChild

      public Node removeChild(Node oldChild) throws DOMException
      Description copied from class: NodeImpl
      Removes the child node indicated by oldChild from the list of children, and returns it.
      Specified by:
      removeChild in interface Node
      Overrides:
      removeChild in class NodeImpl
      Parameters:
      oldChild - The node being removed.
      Returns:
      The node removed.
      Throws:
      DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
      NOT_FOUND_ERR: Raised if oldChild is not a child of this node.
    • cloneNode

      public Node cloneNode(boolean deep)
      Description copied from class: MessageElement
      Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. The duplicate node has no parent; ( parentNode is null.).
      Cloning an Element copies all attributes and their values, including those generated by the XML processor to represent defaulted attributes, but this method does not copy any text it contains unless it is a deep clone, since the text is contained in a child Text node. Cloning an Attribute directly, as opposed to be cloned as part of an Element cloning operation, returns a specified attribute ( specified is true). Cloning any other type of node simply returns a copy of this node.
      Note that cloning an immutable subtree results in a mutable copy, but the children of an EntityReference clone are readonly . In addition, clones of unspecified Attr nodes are specified. And, cloning Document, DocumentType, Entity, and Notation nodes is implementation dependent.
      Specified by:
      cloneNode in interface Node
      Overrides:
      cloneNode in class MessageElement
      Parameters:
      deep - If true, recursively clone the subtree under the specified node; if false, clone only the node itself (and its attributes, if it is an Element).
      Returns:
      The duplicate node.
    • childDeepCloned

      protected void childDeepCloned(NodeImpl oldNode, NodeImpl newNode)
      Overrides:
      childDeepCloned in class MessageElement
    • setOwnerDocument

      public void setOwnerDocument(SOAPPart sp)
    • setRecorded

      public void setRecorded(boolean recorded)
    • isRecorded

      public boolean isRecorded()
    • setDirty

      public void setDirty(boolean dirty)
      Description copied from class: NodeImpl
      set the dirty bit. will also set our parent as dirty, if there is one. Note that clearing the dirty bit does not propagate upwards.
      Overrides:
      setDirty in class NodeImpl
      Parameters:
      dirty - new value of the dirty bit