Save This Page
Home » synapse-1.2-src » org.apache.synapse.util » [javadoc | source]
org.apache.synapse.util
public class: MessageHelper [javadoc | source]
java.lang.Object
   org.apache.synapse.util.MessageHelper
Method from org.apache.synapse.util.MessageHelper Summary:
cloneAxis2MessageContext,   cloneMessageContext,   clonePartially,   cloneSOAPEnvelope,   getClonedTransportHeaders,   removeAddressingHeaders
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.synapse.util.MessageHelper Detail:
 public static MessageContext cloneAxis2MessageContext(MessageContext mc) throws AxisFault 
    This method will simulate cloning the message context and creating an exact copy of the passed message. One should use this method with care; that is because, inside the new MC, most of the attributes of the MC like opCtx and so on are still kept as references. Otherwise there will be perf issues. But ..... this may reveal in some conflicts in the cloned message if you try to do advanced mediations with the cloned message, in which case you should mannually get a clone of the changing part of the MC and set that cloned part to your MC. Changing the MC after doing that will solve most of the issues. (Note: U dont have to worrie about the SOAPEnvelope, it is a cloned copy and not a reference from any other MC)
 public static MessageContext cloneMessageContext(MessageContext synCtx) throws AxisFault 
    This method will simulate cloning the message context and creating an exact copy of the passed message. One should use this method with care; that is because, inside the new MC, most of the attributes of the MC like opCtx and so on are still kept as references inside the axis2 MessageContext for performance improvements. (Note: U dont have to worrie about the SOAPEnvelope, it is a cloned copy and not a reference from any other MC)
 public static MessageContext clonePartially(MessageContext ori) throws AxisFault 
 public static SOAPEnvelope cloneSOAPEnvelope(SOAPEnvelope envelope) 
    This method will clone the provided SOAPEnvelope and returns the cloned envelope as an exact copy of the provided envelope
 public static Map getClonedTransportHeaders(MessageContext msgCtx) 
 public static SOAPEnvelope removeAddressingHeaders(MessageContext axisMsgCtx) 
    Removes Submission and Final WS-Addressing headers and return the SOAPEnvelope from the given message context