org.apache.axis2.util
Class MessageContextBuilder

java.lang.Object
  extended by org.apache.axis2.util.MessageContextBuilder

public class MessageContextBuilder
extends Object


Field Summary
protected static org.apache.commons.logging.Log log
           
 
Constructor Summary
MessageContextBuilder()
           
 
Method Summary
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 MessageContext
static String switchNamespacePrefix(String soapFaultCode, org.apache.axiom.om.OMNamespace namespace)
          Switch the namespace prefix in the soap fault code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.commons.logging.Log log
Constructor Detail

MessageContextBuilder

public MessageContextBuilder()
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,
                                           org.apache.axiom.om.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:


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.