public interface SOAPMessageContext extends javax.xml.rpc.handler.MessageContext {
// Public Instance Methods
public abstract javax.xml.soap.SOAPMessage getMessage( );
public abstract String[ ] getRoles( );
public abstract void setMessage( javax.xml.soap.SOAPMessage message)
}
The SOAPMessageContext interface represents the
context information passed between JAX-RPC message handlers that are
placed in the processing pipeline for an incoming or outgoing
message, when that message is constructed according to the rules of
the SOAP 1.1 specification. An instance of this interface is passed
as an argument to the handleRequest( ),
handleResponse( ), and handleFault(
) methods of each SOAP message handler in the pipeline.
Most of the functionality of this interface is inherited from
MessageContext, from which it is derived. The
SOAPMessageContext interface adds only three
methods, all of which are specific to SOAP as the underlying message
protocol. The getRoles( ) method returns the set
of SOAP roles that apply to the handler chain within which the
SOAPMessageContext object is being used. This
information is obtained by the runtime system from configuration
information associated with the handler chain. The
setMessage( ) method is used by the JAX-RPC
runtime to store a reference to the message being processed so that
handlers can retrieve it by calling getMessage( ).
A handler may also use the setMessage( ) method to
change the message being processed. This is typically done when a
handler detects an error and wishes to prevent the original message
from being sent, and to substitute a SOAP fault message that is
returned to the client. A substitution of the response message for a
fault or other message may also take place on the server side.