Package org.apache.axiom.soap

## Interface SOAPFactory

- All Superinterfaces:
    `OMFactory`

      public interface SOAPFactory
      extends OMFactory

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `SOAPMessage` | `createDefaultSOAPMessage()` | Create a default SOAP message with an envelope with an empty body.
    `SOAPBody` | `createSOAPBody()` |
    `SOAPBody` | `createSOAPBody​(SOAPEnvelope envelope)` |
    `SOAPEnvelope` | `createSOAPEnvelope()` | Create a SOAP envelope.
    `SOAPEnvelope` | `createSOAPEnvelope​(OMNamespace ns)` | Create a SOAP envelope with the given namespace.
    `SOAPFault` | `createSOAPFault()` |
    `SOAPFault` | `createSOAPFault​(SOAPBody parent)` |
    `SOAPFault` | `createSOAPFault​(SOAPBody parent, Exception e)` |
    `SOAPFaultCode` | `createSOAPFaultCode()` |
    `SOAPFaultCode` | `createSOAPFaultCode​(SOAPFault parent)` | Code eii under SOAPFault (parent)
    `SOAPFaultDetail` | `createSOAPFaultDetail()` |
    `SOAPFaultDetail` | `createSOAPFaultDetail​(SOAPFault parent)` | Detail eii under SOAPFault (parent)
    `SOAPFaultNode` | `createSOAPFaultNode()` |
    `SOAPFaultNode` | `createSOAPFaultNode​(SOAPFault parent)` | Node eii under SOAPFault (parent)
    `SOAPFaultReason` | `createSOAPFaultReason()` |
    `SOAPFaultReason` | `createSOAPFaultReason​(SOAPFault parent)` | Reason eii under SOAPFault (parent)
    `SOAPFaultRole` | `createSOAPFaultRole()` |
    `SOAPFaultRole` | `createSOAPFaultRole​(SOAPFault parent)` | Role eii under SOAPFault (parent)
    `SOAPFaultSubCode` | `createSOAPFaultSubCode()` |
    `SOAPFaultSubCode` | `createSOAPFaultSubCode​(SOAPFaultCode parent)` |
    `SOAPFaultSubCode` | `createSOAPFaultSubCode​(SOAPFaultSubCode parent)` | SubCode eii under SubCode (parent)
    `SOAPFaultText` | `createSOAPFaultText()` |
    `SOAPFaultText` | `createSOAPFaultText​(SOAPFaultReason parent)` | SubCode eii under SubCode (parent)
    `SOAPFaultValue` | `createSOAPFaultValue()` |
    `SOAPFaultValue` | `createSOAPFaultValue​(SOAPFaultCode parent)` | Value eii under Code (parent)
    `SOAPFaultValue` | `createSOAPFaultValue​(SOAPFaultSubCode parent)` | SubCode eii under Value (parent)
    `SOAPHeader` | `createSOAPHeader()` |
    `SOAPHeader` | `createSOAPHeader​(SOAPEnvelope envelope)` | Create a `SOAPHeader` as a child of the given `SOAPEnvelope`.
    `SOAPHeaderBlock` | `createSOAPHeaderBlock​(String localName, OMNamespace ns)` |
    `SOAPHeaderBlock` | `createSOAPHeaderBlock​(String localName, OMNamespace ns, OMDataSource source)` | Create a `SOAPHeaderBlock` from an `OMDataSource` with a known local name and namespace URI.
    `SOAPHeaderBlock` | `createSOAPHeaderBlock​(String localName, OMNamespace ns, SOAPHeader parent)` |
    `SOAPHeaderBlock` | `createSOAPHeaderBlock​(OMDataSource source)` | Create a `SOAPHeaderBlock` from an `OMDataSource`.
    `SOAPHeaderBlock` | `createSOAPHeaderBlock​(OMElement element)` | Create a new `SOAPHeaderBlock` with the same content as the given element.
    `SOAPMessage` | `createSOAPMessage()` |
    `SOAPEnvelope` | `getDefaultEnvelope()` | Create a default SOAP envelope with an empty header and an empty body.
    `SOAPEnvelope` | `getDefaultFaultEnvelope()` |
    `OMNamespace` | `getNamespace()` | Get the envelope namespace for the SOAP version used by this factory.
    `SOAPVersion` | `getSOAPVersion()` |
    `String` | `getSoapVersionURI()` |

    - ### Methods inherited from interface org.apache.axiom.om.OMFactory

      `createOMAttribute, createOMComment, createOMDocType, createOMDocument, createOMElement, createOMElement, createOMElement, createOMElement, createOMElement, createOMElement, createOMElement, createOMElement, createOMEntityReference, createOMNamespace, createOMProcessingInstruction, createOMText, createOMText, createOMText, createOMText, createOMText, createOMText, createOMText, createOMText, createOMText, createOMText, createOMText, createOMText, createOMText, getMetaFactory, importInformationItem`

- - ### Method Detail

    - #### getSoapVersionURI

          String getSoapVersionURI()

    - #### getSOAPVersion

          SOAPVersion getSOAPVersion()

    - #### createSOAPMessage

          SOAPMessage createSOAPMessage()

    - #### createSOAPEnvelope

          SOAPEnvelope createSOAPEnvelope()
                                   throws SOAPProcessingException

      Create a SOAP envelope. The returned element will have the namespace URI specified by the SOAP version that this factory represents. It will have the prefix given by `SOAPConstants.SOAP_DEFAULT_NAMESPACE_PREFIX`. It will also have a corresponding namespace declaration.
      Returns:
        the SOAP envelope
      Throws:
        `SOAPProcessingException`

    - #### createSOAPEnvelope

          SOAPEnvelope createSOAPEnvelope​(OMNamespace ns)

      Create a SOAP envelope with the given namespace. This method can be used to create a SOAP envelope with a custom namespace prefix.
      Parameters:
        `ns` - the namespace information for the SOAP envelope
      Returns:
        the SOAP envelope

    - #### createSOAPHeader

          SOAPHeader createSOAPHeader​(SOAPEnvelope envelope)
                               throws SOAPProcessingException

      Create a `SOAPHeader` as a child of the given `SOAPEnvelope`.

      Note that for most use cases, it is preferable to use `SOAPEnvelope.getOrCreateHeader()` instead of this method.

      Parameters:
        `envelope` - the parent of the `SOAPHeader`
      Returns:
        the newly created `SOAPHeader`
      Throws:
        `SOAPProcessingException`

    - #### createSOAPHeader

          SOAPHeader createSOAPHeader()
                               throws SOAPProcessingException

      Throws:
        `SOAPProcessingException`

    - #### createSOAPHeaderBlock

          SOAPHeaderBlock createSOAPHeaderBlock​(String localName,
                                                OMNamespace ns,
                                                SOAPHeader parent)
                                         throws SOAPProcessingException

      Parameters:
        `localName` -
        `ns` -
      Returns:
        Returns SOAPHeaderBlock.
      Throws:
        `SOAPProcessingException`

    - #### createSOAPHeaderBlock

          SOAPHeaderBlock createSOAPHeaderBlock​(String localName,
                                                OMNamespace ns)
                                         throws SOAPProcessingException

      Throws:
        `SOAPProcessingException`

    - #### createSOAPHeaderBlock

          SOAPHeaderBlock createSOAPHeaderBlock​(OMDataSource source)

      Create a `SOAPHeaderBlock` from an `OMDataSource`. The semantics of the method parameters are the same as for `OMFactory.createOMElement(OMDataSource)`.
      Parameters:
        `source` - the data source; must not be `null`
      Returns:
        the newly created header block

    - #### createSOAPHeaderBlock

          SOAPHeaderBlock createSOAPHeaderBlock​(String localName,
                                                OMNamespace ns,
                                                OMDataSource source)
                                         throws SOAPProcessingException

      Create a `SOAPHeaderBlock` from an `OMDataSource` with a known local name and namespace URI. The semantics of the method parameters are the same as for `OMFactory.createOMElement(OMDataSource, String, OMNamespace)`.
      Parameters:
        `localName` - the local part of the name of the element produced by the data source; must not be `null`
        `ns` - the namespace of the element produced by the data source, or `null` if the element has no namespace
        `source` - the data source; must not be `null`
      Returns:
        the newly created header block
      Throws:
        `SOAPProcessingException`

    - #### createSOAPHeaderBlock

          SOAPHeaderBlock createSOAPHeaderBlock​(OMElement element)

      Create a new `SOAPHeaderBlock` with the same content as the given element.
      Parameters:
        `element` - the element to import as a header block
      Returns:
        the header block

    - #### createSOAPFault

          SOAPFault createSOAPFault​(SOAPBody parent,
                                    Exception e)
                             throws SOAPProcessingException

      Parameters:
        `parent` -
        `e` -
      Returns:
        Returns SOAPFault.
      Throws:
        `SOAPProcessingException`

    - #### createSOAPFault

          SOAPFault createSOAPFault​(SOAPBody parent)
                             throws SOAPProcessingException

      Throws:
        `SOAPProcessingException`

    - #### createSOAPFault

          SOAPFault createSOAPFault()
                             throws SOAPProcessingException

      Throws:
        `SOAPProcessingException`

    - #### createSOAPBody

          SOAPBody createSOAPBody​(SOAPEnvelope envelope)
                           throws SOAPProcessingException

      Parameters:
        `envelope` -
      Returns:
        Returns SOAPBody.
      Throws:
        `SOAPProcessingException`

    - #### createSOAPBody

          SOAPBody createSOAPBody()
                           throws SOAPProcessingException

      Throws:
        `SOAPProcessingException`

    - #### createSOAPFaultCode

          SOAPFaultCode createSOAPFaultCode​(SOAPFault parent)
                                     throws SOAPProcessingException

      Code eii under SOAPFault (parent)
      Parameters:
        `parent` -
      Returns:
        Returns SOAPFaultCode.
      Throws:
        `SOAPProcessingException`

    - #### createSOAPFaultCode

          SOAPFaultCode createSOAPFaultCode()
                                     throws SOAPProcessingException

      Throws:
        `SOAPProcessingException`

    - #### createSOAPFaultValue

          SOAPFaultValue createSOAPFaultValue​(SOAPFaultCode parent)
                                       throws SOAPProcessingException

      Value eii under Code (parent)
      Parameters:
        `parent` -
      Returns:
        Returns SOAPFaultValue.
      Throws:
        `SOAPProcessingException`

    - #### createSOAPFaultValue

          SOAPFaultValue createSOAPFaultValue()
                                       throws SOAPProcessingException

      Throws:
        `SOAPProcessingException`

    - #### createSOAPFaultValue

          SOAPFaultValue createSOAPFaultValue​(SOAPFaultSubCode parent)
                                       throws SOAPProcessingException

      SubCode eii under Value (parent)
      Parameters:
        `parent` -
      Returns:
        Returns SOAPFaultValue.
      Throws:
        `SOAPProcessingException`

    - #### createSOAPFaultSubCode

          SOAPFaultSubCode createSOAPFaultSubCode​(SOAPFaultCode parent)
                                           throws SOAPProcessingException

      Throws:
        `SOAPProcessingException`

    - #### createSOAPFaultSubCode

          SOAPFaultSubCode createSOAPFaultSubCode()
                                           throws SOAPProcessingException

      Throws:
        `SOAPProcessingException`

    - #### createSOAPFaultSubCode

          SOAPFaultSubCode createSOAPFaultSubCode​(SOAPFaultSubCode parent)
                                           throws SOAPProcessingException

      SubCode eii under SubCode (parent)
      Parameters:
        `parent` -
      Returns:
        Returns SOAPFaultSubCode.
      Throws:
        `SOAPProcessingException`

    - #### createSOAPFaultReason

          SOAPFaultReason createSOAPFaultReason​(SOAPFault parent)
                                         throws SOAPProcessingException

      Reason eii under SOAPFault (parent)
      Parameters:
        `parent` -
      Returns:
        Returns SOAPFaultReason.
      Throws:
        `SOAPProcessingException`

    - #### createSOAPFaultReason

          SOAPFaultReason createSOAPFaultReason()
                                         throws SOAPProcessingException

      Throws:
        `SOAPProcessingException`

    - #### createSOAPFaultText

          SOAPFaultText createSOAPFaultText​(SOAPFaultReason parent)
                                     throws SOAPProcessingException

      SubCode eii under SubCode (parent)
      Parameters:
        `parent` -
      Returns:
        Returns SOAPFaultText.
      Throws:
        `SOAPProcessingException`

    - #### createSOAPFaultText

          SOAPFaultText createSOAPFaultText()
                                     throws SOAPProcessingException

      Throws:
        `SOAPProcessingException`

    - #### createSOAPFaultNode

          SOAPFaultNode createSOAPFaultNode​(SOAPFault parent)
                                     throws SOAPProcessingException

      Node eii under SOAPFault (parent)
      Parameters:
        `parent` -
      Returns:
        Returns SOAPFaultNode.
      Throws:
        `SOAPProcessingException`

    - #### createSOAPFaultNode

          SOAPFaultNode createSOAPFaultNode()
                                     throws SOAPProcessingException

      Throws:
        `SOAPProcessingException`

    - #### createSOAPFaultRole

          SOAPFaultRole createSOAPFaultRole​(SOAPFault parent)
                                     throws SOAPProcessingException

      Role eii under SOAPFault (parent)
      Parameters:
        `parent` -
      Returns:
        Returns SOAPFaultRole.
      Throws:
        `SOAPProcessingException`

    - #### createSOAPFaultRole

          SOAPFaultRole createSOAPFaultRole()
                                     throws SOAPProcessingException

      Throws:
        `SOAPProcessingException`

    - #### createSOAPFaultDetail

          SOAPFaultDetail createSOAPFaultDetail​(SOAPFault parent)
                                         throws SOAPProcessingException

      Detail eii under SOAPFault (parent)
      Parameters:
        `parent` -
      Returns:
        Returns SOAPFaultDetail.
      Throws:
        `SOAPProcessingException`

    - #### createSOAPFaultDetail

          SOAPFaultDetail createSOAPFaultDetail()
                                         throws SOAPProcessingException

      Throws:
        `SOAPProcessingException`

    - #### getDefaultEnvelope

          SOAPEnvelope getDefaultEnvelope()
                                   throws SOAPProcessingException

      Create a default SOAP envelope with an empty header and an empty body. Note that the method will not create an associated `SOAPMessage` or `OMDocument` instance and the parent of the returned `SOAPEnvelope` is `null`.

      Note: This method is typically used in conjunction with `SOAPEnvelope.getHeader()`. In order to avoid generating unnecessary empty SOAP headers, you should consider using `createDefaultSOAPMessage()` together with `SOAPEnvelope.getOrCreateHeader()` instead. This method may be deprecated and/or removed in future Axiom versions.

      Returns:
        the default SOAP envelope
      Throws:
        `SOAPProcessingException`

    - #### createDefaultSOAPMessage

          SOAPMessage createDefaultSOAPMessage()

      Create a default SOAP message with an envelope with an empty body.

      Since no SOAP header is added to the envelope, this method should be used in conjunction with `SOAPEnvelope.getOrCreateHeader()` (if SOAP header blocks need to be added).

      Returns:
        the default SOAP envelope

    - #### getDefaultFaultEnvelope

          SOAPEnvelope getDefaultFaultEnvelope()
                                        throws SOAPProcessingException

      Throws:
        `SOAPProcessingException`

    - #### getNamespace

          OMNamespace getNamespace()

      Get the envelope namespace for the SOAP version used by this factory. The returned `OMNamespace` instance has the following properties:
      - The prefix is set to `SOAPConstants.SOAP_DEFAULT_NAMESPACE_PREFIX` (which is the same as the prefix used by methods such as `createSOAPEnvelope()`).
      - The namespace URI is the same as returned by `getSoapVersionURI()`.
      Returns:
        the envelope namespace for the SOAP version used by this factory