|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.ws.soap.security.AbstractWsSecurityInterceptor
public abstract class AbstractWsSecurityInterceptor
Interceptor base class for interceptors that handle WS-Security.
Subclasses of this base class can be configured to validate incoming and secure outgoing messages. By default, both are on.
Field Summary | |
---|---|
protected org.apache.commons.logging.Log |
logger
Logger available to subclasses. |
Constructor Summary | |
---|---|
AbstractWsSecurityInterceptor()
|
Method Summary | |
---|---|
protected abstract void |
cleanUp()
|
boolean |
handleFault(org.springframework.ws.context.MessageContext messageContext,
java.lang.Object endpoint)
Returns true , i.e. |
protected boolean |
handleFaultException(WsSecurityFaultException ex,
org.springframework.ws.context.MessageContext messageContext)
Handles a fault exception.Default implementation logs the given exception, and creates a SOAP Fault with the properties of the given exception, and returns false . |
boolean |
handleRequest(org.springframework.ws.context.MessageContext messageContext,
java.lang.Object endpoint)
|
boolean |
handleResponse(org.springframework.ws.context.MessageContext messageContext,
java.lang.Object endpoint)
|
protected boolean |
handleSecurementException(WsSecuritySecurementException ex,
org.springframework.ws.context.MessageContext messageContext)
Handles an securement exception. |
protected boolean |
handleValidationException(WsSecurityValidationException ex,
org.springframework.ws.context.MessageContext messageContext)
Handles an invalid SOAP message. |
protected abstract void |
secureMessage(org.springframework.ws.soap.SoapMessage soapMessage)
Abstract template method. |
void |
setSecureResponse(boolean secureResponse)
Indicates whether outgoing responsed are to be secured. |
void |
setValidateRequest(boolean validateRequest)
Indicates whether incoming request are to be validated. |
boolean |
understands(org.springframework.ws.soap.SoapHeaderElement headerElement)
|
protected abstract void |
validateMessage(org.springframework.ws.soap.SoapMessage soapMessage)
Abstract template method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final org.apache.commons.logging.Log logger
Constructor Detail |
---|
public AbstractWsSecurityInterceptor()
Method Detail |
---|
public void setSecureResponse(boolean secureResponse)
true
.
public void setValidateRequest(boolean validateRequest)
true
.
public final boolean handleRequest(org.springframework.ws.context.MessageContext messageContext, java.lang.Object endpoint) throws java.lang.Exception
handleRequest
in interface org.springframework.ws.server.EndpointInterceptor
java.lang.Exception
public final boolean handleResponse(org.springframework.ws.context.MessageContext messageContext, java.lang.Object endpoint) throws java.lang.Exception
handleResponse
in interface org.springframework.ws.server.EndpointInterceptor
java.lang.Exception
public boolean handleFault(org.springframework.ws.context.MessageContext messageContext, java.lang.Object endpoint) throws java.lang.Exception
true
, i.e. faults are not secured.
handleFault
in interface org.springframework.ws.server.EndpointInterceptor
java.lang.Exception
public boolean understands(org.springframework.ws.soap.SoapHeaderElement headerElement)
understands
in interface org.springframework.ws.soap.server.SoapEndpointInterceptor
protected boolean handleSecurementException(WsSecuritySecurementException ex, org.springframework.ws.context.MessageContext messageContext)
false
.
ex
- the validation exceptionmessageContext
- the message context
true
to continue processing the message, false
(the default) otherwiseprotected boolean handleValidationException(WsSecurityValidationException ex, org.springframework.ws.context.MessageContext messageContext)
false
.
ex
- the validation exceptionmessageContext
- the message context
true
to continue processing the message, false
(the default) otherwiseprotected boolean handleFaultException(WsSecurityFaultException ex, org.springframework.ws.context.MessageContext messageContext)
false
.
ex
- the validation exceptionmessageContext
- the message context
true
to continue processing the message, false
(the default) otherwiseprotected abstract void validateMessage(org.springframework.ws.soap.SoapMessage soapMessage) throws WsSecurityValidationException
SoapMessage
, and replace the original request with the validated version.
soapMessage
- the soap message to validate
WsSecurityValidationException
- in case of validation errorsprotected abstract void secureMessage(org.springframework.ws.soap.SoapMessage soapMessage) throws WsSecuritySecurementException
SoapMessage
, and replace the original response with the secured version.
soapMessage
- the soap message to secure
WsSecuritySecurementException
- in case of securement errorsprotected abstract void cleanUp()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |