Class XMLFaultUtils


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

      • XMLFaultUtils

        public XMLFaultUtils()
    • Method Detail

      • isFault

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

        public static boolean isFault​(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.
      • createSOAPFault

        public static SOAPFault createSOAPFault​(XMLFault xmlFault,
                                                SOAPBody body,
                                                boolean ignoreDetailBlocks)
                                         throws 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:
        WebServiceException