Package org.apache.axiom.soap

## Interface SOAPFaultReason

- All Superinterfaces:
    `OMContainer`, `OMElement`, `OMInformationItem`, `OMNamedInformationItem`, `OMNode`, `OMSerializable`

      public interface SOAPFaultReason
      extends OMElement

- - ### Field Summary

    - ### Fields inherited from interface org.apache.axiom.om.OMNode

      `CDATA_SECTION_NODE, COMMENT_NODE, DTD_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, PI_NODE, SPACE_NODE, TEXT_NODE`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addSOAPText​(SOAPFaultText soapFaultText)` |
    `List<SOAPFaultText>` | `getAllSoapTexts()` |
    `String` | `getFaultReasonText​(Locale locale)` | Extract the fault reason text for the locale that best matches the given locale.
    `SOAPFaultText` | `getFirstSOAPText()` |
    `SOAPFaultText` | `getSOAPFaultText​(String language)` |

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

      `addChild, getBuilder, getChildren, getChildrenWithLocalName, getChildrenWithName, getChildrenWithNamespaceURI, getFirstChildWithName, getFirstOMChild, getSAXResult, getSAXSource, getXMLStreamReader, getXMLStreamReader, getXMLStreamReader, getXMLStreamReaderWithoutCaching, getXOPEncodedStreamReader, removeChildren, serialize, serialize, serialize, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume`

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

      `addAttribute, addAttribute, cloneOMElement, declareDefaultNamespace, declareNamespace, declareNamespace, findNamespace, findNamespaceURI, getAllAttributes, getAllDeclaredNamespaces, getAttribute, getAttributeValue, getChildElements, getDefaultNamespace, getDescendants, getFirstElement, getLineNumber, getNamespaceContext, getNamespacesInScope, getText, getTextAsQName, getTextAsStream, removeAttribute, resolveQName, setLineNumber, setNamespace, setNamespaceWithNoFindInCurrentScope, setText, setText, toString, toStringWithConsume, undeclarePrefix, writeTextTo`

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

      `clone, getOMFactory`

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

      `getLocalName, getNamespace, getNamespaceURI, getPrefix, getQName, hasName, setLocalName, setNamespace`

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

      `buildWithAttachments, detach, discard, getNextOMSibling, getParent, getPreviousOMSibling, getType, insertSiblingAfter, insertSiblingBefore`

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

      `build, close, isComplete, serialize, serialize, serializeAndConsume`

- - ### Method Detail

    - #### addSOAPText

          void addSOAPText​(SOAPFaultText soapFaultText)
                    throws SOAPProcessingException

      Throws:
        `SOAPProcessingException`

    - #### getFirstSOAPText

          SOAPFaultText getFirstSOAPText()

    - #### getAllSoapTexts

          List<SOAPFaultText> getAllSoapTexts()

    - #### getSOAPFaultText

          SOAPFaultText getSOAPFaultText​(String language)

    - #### getFaultReasonText

          String getFaultReasonText​(Locale locale)

      Extract the fault reason text for the locale that best matches the given locale. This method works for all SOAP versions. Since SOAP 1.1 doesn't support localized fault reasons, the locale is effectively ignored in that version. For SOAP 1.2 the method extracts the text from the `SOAPFaultText` that best matches the given locale, falling back to English.
      Parameters:
        `locale` - the requested locale
      Returns:
        the reason text