code: private boolean isSoapFault(Document soapMessage) throws Exception {
          Element faultElement = DomUtils.getElementByTagNameNS(soapMessage,
                  SOAP_12_NAMESPACE, "Fault");
  
          if (faultElement != null) {
              return true;
          } else {
              faultElement = DomUtils.getElementByTagNameNS(soapMessage,
                      SOAP_11_NAMESPACE, "Fault");
              if (faultElement != null) {
                  return true;
              }
          }
          return false;
      }
docs: A method to check if the message received is a SOAP fault.
  
  @param soapMessage
  the SOAP message to check.
  
  @author Simone Gianfranceschi