Package org.apache.axis2.util
Class MessageContextBuilder
- java.lang.Object
-
- org.apache.axis2.util.MessageContextBuilder
-
public class MessageContextBuilder extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.commons.logging.Log
log
-
Constructor Summary
Constructors Constructor Description MessageContextBuilder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MessageContext
createFaultMessageContext(MessageContext processingContext, Throwable e)
This method is called to handle any error that occurs at inflow or outflow.static MessageContext
createOutMessageContext(MessageContext inMessageContext)
Creates a MessageContext for use with a non-fault response based on an request MessageContextstatic String
switchNamespacePrefix(String soapFaultCode, OMNamespace namespace)
Switch the namespace prefix in the soap fault code.
-
-
-
Method Detail
-
createOutMessageContext
public static MessageContext createOutMessageContext(MessageContext inMessageContext) throws AxisFault
Creates a MessageContext for use with a non-fault response based on an request MessageContext- Parameters:
inMessageContext
- for the out message context to be created- Returns:
- created out message context from the given in message context
- Throws:
AxisFault
- error in creating the out message context
-
createFaultMessageContext
public static MessageContext createFaultMessageContext(MessageContext processingContext, Throwable e) throws AxisFault
This method is called to handle any error that occurs at inflow or outflow. But if the method is called twice, it implies that sending the error handling has failed, in which case the method logs the error and exits.- Throws:
AxisFault
-
switchNamespacePrefix
public static String switchNamespacePrefix(String soapFaultCode, OMNamespace namespace)
Switch the namespace prefix in the soap fault code. It should match the prefix used by the outgoing soap envelope.- Parameters:
soapFaultCode
-namespace
-- Returns:
-
-