Class Axis2Sender


  • public class Axis2Sender
    extends Object
    This class helps the Axis2SynapseEnvironment implement the send method
    • Constructor Detail

      • Axis2Sender

        public Axis2Sender()
    • Method Detail

      • sendOn

        public static void sendOn​(EndpointDefinition endpoint,
                                  MessageContext synapseInMessageContext)
        Send a message out from the Synapse engine to an external service
        Parameters:
        endpoint - the endpoint definition where the message should be sent
        synapseInMessageContext - the Synapse message context
      • sendBack

        public static void sendBack​(MessageContext smc)
        Send a response back to a client of Synapse
        Parameters:
        smc - the Synapse message context sent as the response
      • preventMultipleResponses

        public static boolean preventMultipleResponses​(MessageContext messageContext)
        This will ensure only one response is sent for a single request. In HTTP request-response paradigm only a one response is allowed for a single request. Due to synapse configuration issues, there is a chance of multiple response getting sent for a single request Calling this method from all the places where we sent out a response message from engine will prevent that from happening
        Parameters:
        messageContext - Synapse message context
        Returns:
        whether a response is already sent