Interface SOAPFaultClassifier

All Superinterfaces:
OMContainer, OMElement, OMInformationItem, OMNamedInformationItem, OMNode, OMSerializable
All Known Subinterfaces:
SOAPFaultCode, SOAPFaultSubCode

public interface SOAPFaultClassifier extends OMElement
Common superinterface for SOAPFaultCode and SOAPFaultSubCode. This interface enables manipulation of SOAP fault codes and SOAP fault sub codes using common code.
  • Method Details

    • setValue

      void setValue(SOAPFaultValue value) throws SOAPProcessingException
      Fault SubCode contain only one mandatory Value child. This value child contains a QName
      Parameters:
      value -
      Throws:
      SOAPProcessingException
    • getValue

      SOAPFaultValue getValue()
      Get the SOAPFaultValue for this fault code or subcode. Note that for SOAP 1.1, the return value will always be null. Use getValueAsQName() as a SOAP version independent way to extract the value of a fault code or subcode.
      Returns:
      the SOAPFaultValue object or null if there is no SOAPFaultValue
    • setValue

      void setValue(QName value)
      Set the value of this fault code or subcode. The effect of this method depends on the SOAP version. For SOAP 1.1, the method sets the text content of the SOAPFaultCode element. For SOAP 1.2, the method ensures that the SOAPFaultCode or SOAPFaultSubCode element has a child of type SOAPFaultValue child (creating one if necessary) and sets the text content of that child. In both cases, the method adds an appropriate namespace declaration if necessary.
      Parameters:
      value - the QName for the fault code or subcode value
    • getValueAsQName

      QName getValueAsQName()
      Get the value of this fault code or subcode. This method can be consistently used for all SOAP versions. For SOAP 1.1, it gets the text content of this element (which is necessarily a SOAPFaultCode) and resolves it as a QName. For SOAP 1.2, it locates the SOAPFaultValue child, extracts the text content from that element and resolves it as a QName.

      The method returns null if it fails to extract the value. Note that invalid SOAP faults are very common (especially with SOAP 1.1). Therefore the caller must be prepared to get a null value.

      Returns:
      the QName for the fault code or subcode value, or null if the value could not be determined
    • setSubCode

      void setSubCode(SOAPFaultSubCode subCode) throws SOAPProcessingException
      Fault SubCode can contain an optional SubCode
      Parameters:
      subCode -
      Throws:
      SOAPProcessingException
    • getSubCode

      SOAPFaultSubCode getSubCode()
      Returns:
      Returns SOAPFaultSubCode.