|
Spring Web Services Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.ws.soap.security.AbstractWsSecurityInterceptor org.springframework.ws.soap.security.xwss.XwsSecurityInterceptor
public class XwsSecurityInterceptor
WS-Security endpoint interceptor that is based on Sun's XML and Web Services Security package (XWSS). This WS-Security implementation is part of the Java Web Services Developer Pack (Java WSDP).
This interceptor needs aCallbackHandler
to operate. This handler is used to retrieve certificates,
private keys, validate user credentials, etc. Refer to the XWSS Javadoc to learn more about the specific
Callback
s fired by XWSS. You can also set multiple handlers, each of which will be used in turn.
Additionally, you must define a XWSS policy file by setting policyConfiguration
property. The format of
the policy file is documented in the Java
Web Services Tutorial.
Note that this interceptor depends on SAAJ, and thus requires SaajSoapMessage
s to operate. This
means that you must use a SaajSoapMessageFactory
to create the SOAP messages.
setCallbackHandler(javax.security.auth.callback.CallbackHandler)
,
setPolicyConfiguration(org.springframework.core.io.Resource)
,
XWSSCallback
,
SaajSoapMessageFactory
,
XWSSField Summary |
---|
Fields inherited from class org.springframework.ws.soap.security.AbstractWsSecurityInterceptor |
---|
logger, WS_SECURITY_NAME |
Constructor Summary | |
---|---|
XwsSecurityInterceptor()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
protected void |
cleanUp()
|
protected void |
secureMessage(SoapMessage soapMessage,
MessageContext messageContext)
Secures the given SoapMessage message in accordance with the defined security policy. |
void |
setCallbackHandler(CallbackHandler callbackHandler)
Sets the handler to resolve XWSS callbacks. |
void |
setCallbackHandlers(CallbackHandler[] callbackHandler)
Sets the handlers to resolve XWSS callbacks. |
void |
setPolicyConfiguration(Resource policyConfiguration)
Sets the policy configuration to use for XWSS. |
protected void |
validateMessage(SoapMessage soapMessage,
MessageContext messageContext)
Validates the given SoapMessage message in accordance with the defined security policy. |
Methods inherited from class org.springframework.ws.soap.security.AbstractWsSecurityInterceptor |
---|
handleFault, handleFault, handleFaultException, handleRequest, handleRequest, handleResponse, handleResponse, handleSecurementException, handleValidationException, setExceptionResolver, setSecureRequest, setSecureResponse, setValidateRequest, setValidateResponse, understands |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XwsSecurityInterceptor()
Method Detail |
---|
public void setCallbackHandler(CallbackHandler callbackHandler)
callbackHandlers
, is
required.
XWSSCallback
,
setCallbackHandlers(javax.security.auth.callback.CallbackHandler[])
public void setCallbackHandlers(CallbackHandler[] callbackHandler)
callbackHandlers
, is
required.
XWSSCallback
,
setCallbackHandler(javax.security.auth.callback.CallbackHandler)
public void setPolicyConfiguration(Resource policyConfiguration)
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
protected void secureMessage(SoapMessage soapMessage, MessageContext messageContext) throws XwsSecuritySecurementException
secureMessage
in class AbstractWsSecurityInterceptor
soapMessage
- the message to be secured
XwsSecuritySecurementException
- in case of errors
IllegalArgumentException
- when soapMessage is not a SaajSoapMessage
protected void validateMessage(SoapMessage soapMessage, MessageContext messageContext) throws WsSecurityValidationException
validateMessage
in class AbstractWsSecurityInterceptor
soapMessage
- the message to be validated
XwsSecurityValidationException
- in case of errors
IllegalArgumentException
- when soapMessage is not a SaajSoapMessage
WsSecurityValidationException
- in case of validation errorsprotected void cleanUp()
cleanUp
in class AbstractWsSecurityInterceptor
|
Spring Web Services Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |