Class CustomEndpointInterceptor
java.lang.Object
swiss.trustbroker.wstrust.service.CustomEndpointInterceptor
- All Implemented Interfaces:
org.springframework.ws.server.EndpointInterceptor,org.springframework.ws.soap.server.SoapEndpointInterceptor
public class CustomEndpointInterceptor
extends Object
implements org.springframework.ws.soap.server.SoapEndpointInterceptor
Interceptor handles the SOAP header and extracts the SAML assertion from it to treat it the SAML POST way.
We translate the DOM element into an opensaml representation here which asserts that the DOM stack is consistent i.e.
we do not get a mess with these implementation variants:
- com.sun.xml.messaging.saaj.soap.impl.ElementImpl
- com.sun.org.apache.xerces.internal.dom.ElementNSImpl
-
Constructor Summary
ConstructorsConstructorDescriptionCustomEndpointInterceptor(swiss.trustbroker.config.TrustBrokerProperties trustBrokerProperties, Transformer transformer) -
Method Summary
Modifier and TypeMethodDescriptionvoidafterCompletion(org.springframework.ws.context.MessageContext messageContext, Object endpoint, Exception ex) static org.opensaml.soap.wsaddressing.Actionstatic org.opensaml.soap.wsaddressing.RelatesTobooleanhandleFault(org.springframework.ws.context.MessageContext messageContext, Object endpoint) booleanhandleRequest(org.springframework.ws.context.MessageContext messageContext, Object endpoint) booleanhandleResponse(org.springframework.ws.context.MessageContext messageContext, Object endpoint) booleanunderstands(org.springframework.ws.soap.SoapHeaderElement header) static org.opensaml.core.xml.XMLObjectunmarshallElement(Element samlElement)
-
Constructor Details
-
CustomEndpointInterceptor
public CustomEndpointInterceptor(swiss.trustbroker.config.TrustBrokerProperties trustBrokerProperties, Transformer transformer)
-
-
Method Details
-
understands
public boolean understands(org.springframework.ws.soap.SoapHeaderElement header) - Specified by:
understandsin interfaceorg.springframework.ws.soap.server.SoapEndpointInterceptor
-
handleRequest
public boolean handleRequest(org.springframework.ws.context.MessageContext messageContext, Object endpoint) - Specified by:
handleRequestin interfaceorg.springframework.ws.server.EndpointInterceptor
-
unmarshallElement
-
handleResponse
public boolean handleResponse(org.springframework.ws.context.MessageContext messageContext, Object endpoint) throws Exception - Specified by:
handleResponsein interfaceorg.springframework.ws.server.EndpointInterceptor- Throws:
Exception
-
handleFault
public boolean handleFault(org.springframework.ws.context.MessageContext messageContext, Object endpoint) - Specified by:
handleFaultin interfaceorg.springframework.ws.server.EndpointInterceptor
-
afterCompletion
public void afterCompletion(org.springframework.ws.context.MessageContext messageContext, Object endpoint, Exception ex) - Specified by:
afterCompletionin interfaceorg.springframework.ws.server.EndpointInterceptor
-
createActionHeader
public static org.opensaml.soap.wsaddressing.Action createActionHeader() -
createEnvRelatesToHeader
public static org.opensaml.soap.wsaddressing.RelatesTo createEnvRelatesToHeader()
-