Class XMLFaultUtils

java.lang.Object
org.apache.axis2.jaxws.message.util.XMLFaultUtils

public class XMLFaultUtils extends Object
Collection of utilities used by the Message implementation to process XMLFaults.
See Also:
  • Constructor Details

    • XMLFaultUtils

      public XMLFaultUtils()
  • Method Details

    • isFault

      public static boolean isFault(jakarta.xml.soap.SOAPEnvelope envelope) throws jakarta.xml.soap.SOAPException
      Parameters:
      envelope - jakarta.xml.soap.SOAPEnvelope
      Returns:
      true if the SOAPEnvelope contains a SOAPFault
      Throws:
      jakarta.xml.soap.SOAPException
    • isFault

      public static boolean isFault(org.apache.axiom.soap.SOAPEnvelope envelope)
      Parameters:
      envelope - org.apache.axiom.soap.SOAPEnvelope
      Returns:
      true if the SOAPEnvelope contains a SOAPFault
    • containsFault

      public static boolean containsFault(Block b)
      Parameters:
      block - representing a message payload
      Returns:
      true if the localname & namespace represent a SOAP 1.1 or SOAP 1.2 fault.
    • createXMLFault

      public static XMLFault createXMLFault(org.apache.axiom.soap.SOAPFault soapFault, Block[] detailBlocks) throws jakarta.xml.ws.WebServiceException
      Create an XMLFault object from a SOAPFault and detail Blocks
      Parameters:
      soapFault -
      detailBlocks -
      Returns:
      Throws:
      jakarta.xml.ws.WebServiceException
    • createXMLFault

      public static XMLFault createXMLFault(jakarta.xml.soap.SOAPFault soapFault) throws jakarta.xml.ws.WebServiceException
      Create XMLFault
      Parameters:
      soapFault -
      Returns:
      xmlFault
      Throws:
      jakarta.xml.ws.WebServiceException
    • createXMLFault

      public static XMLFault createXMLFault(jakarta.xml.soap.SOAPFault soapFault, Block[] detailBlocks) throws jakarta.xml.ws.WebServiceException
      Create an XMLFault object from a SOAPFault and detail Blocks
      Parameters:
      soapFault -
      detailBlocks -
      Returns:
      Throws:
      jakarta.xml.ws.WebServiceException
    • createXMLFault

      public static XMLFault createXMLFault(Block b, Protocol p)
    • createSOAPFault

      public static org.apache.axiom.soap.SOAPFault createSOAPFault(XMLFault xmlFault, org.apache.axiom.soap.SOAPBody body, boolean ignoreDetailBlocks) throws jakarta.xml.ws.WebServiceException
      Create a SOAPFault representing the XMLFault and attach it to body. If there are 1 or more detail Blocks on the XMLFault, a SOAPFaultDetail is attached. If ignoreDetailBlocks=false, then OMElements are added to the SOAPFaultDetail. If ignoreDetailBlocks=true, then the Detail Blocks are ignored (this is necessary for XMLSpine processing)
      Parameters:
      xmlFault -
      body - - Assumes that the body is empty
      ignoreDetailBlocks - true or fals
      Returns:
      SOAPFault (which is attached to body)
      Throws:
      jakarta.xml.ws.WebServiceException
    • createSAAJFault

      public static jakarta.xml.soap.SOAPFault createSAAJFault(XMLFault xmlFault, jakarta.xml.soap.SOAPBody body) throws jakarta.xml.soap.SOAPException, jakarta.xml.ws.WebServiceException
      Create a SOAPFault representing the XMLFault. If there are 1 or more detail Blocks on the XMLFault, a SOAPFaultDetail is attached.
      Parameters:
      xmlFault -
      body -
      Returns:
      SOAPFault (which is attached to body)
      Throws:
      jakarta.xml.soap.SOAPException
      jakarta.xml.ws.WebServiceException