A handler is one of the most important and useful features introduced by the Axis1 project. In fact, the idea of a handler has been used in the industry for a long time. Some refer to handler as the message interceptor. In any messaging system, the interceptor has its factual meaning in the context of messaging too, which intercepts the messaging flow and does whatever task it is assigned to do. In fact, the interceptor is the smallest execution unit in a messaging system so that, as the interceptor in Axis, handler does the same thing.
Handlers, in Axis, are stateless, meaning they do not keep their past execution states in memory. A handler can be considered as a logic invoker with the input for the logic evaluation taken only from the MessageContext
. Handler has both read and write access to
MessageContext (MC) and to incoming SOAP messages. Thus, a handler can read SOAP messages, remove elements from the message (mostly headers), add new elements (headers), or modify elements...