Class XMLFaultUtils
- java.lang.Object
-
- org.apache.axis2.jaxws.message.util.XMLFaultUtils
-
-
Constructor Summary
Constructors Constructor Description XMLFaultUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
containsFault(Block b)
static SOAPFault
createSAAJFault(XMLFault xmlFault, SOAPBody body)
Create a SOAPFault representing the XMLFault.static SOAPFault
createSOAPFault(XMLFault xmlFault, SOAPBody body, boolean ignoreDetailBlocks)
Create a SOAPFault representing the XMLFault and attach it to body.static XMLFault
createXMLFault(SOAPFault soapFault)
Create XMLFaultstatic XMLFault
createXMLFault(SOAPFault soapFault, Block[] detailBlocks)
Create an XMLFault object from a SOAPFault and detail Blocksstatic XMLFault
createXMLFault(SOAPFault soapFault, Block[] detailBlocks)
Create an XMLFault object from a SOAPFault and detail Blocksstatic XMLFault
createXMLFault(Block b, Protocol p)
static boolean
isFault(SOAPEnvelope envelope)
static boolean
isFault(SOAPEnvelope envelope)
-
-
-
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.
-
createXMLFault
public static XMLFault createXMLFault(SOAPFault soapFault, Block[] detailBlocks) throws WebServiceException
Create an XMLFault object from a SOAPFault and detail Blocks- Parameters:
soapFault
-detailBlocks
-- Returns:
- Throws:
WebServiceException
-
createXMLFault
public static XMLFault createXMLFault(SOAPFault soapFault) throws WebServiceException
Create XMLFault- Parameters:
soapFault
-- Returns:
- xmlFault
- Throws:
WebServiceException
-
createXMLFault
public static XMLFault createXMLFault(SOAPFault soapFault, Block[] detailBlocks) throws WebServiceException
Create an XMLFault object from a SOAPFault and detail Blocks- Parameters:
soapFault
-detailBlocks
-- Returns:
- Throws:
WebServiceException
-
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 emptyignoreDetailBlocks
- true or fals- Returns:
- SOAPFault (which is attached to body)
- Throws:
WebServiceException
-
createSAAJFault
public static SOAPFault createSAAJFault(XMLFault xmlFault, SOAPBody body) throws SOAPException, 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:
SOAPException
WebServiceException
-
-