private boolean shouldIntercept(EndpointInterceptor interceptor, MessageContext messageContext, Object endpoint) { if (interceptor instanceof SmartEndpointInterceptor) { return ((SmartEndpointInterceptor) interceptor).shouldIntercept(messageContext, endpoint); } return true; }
@Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { initEndpointAdapters(applicationContext); initEndpointExceptionResolvers(applicationContext); initEndpointMappings(applicationContext); }
/** * Creates a new {@code EndpointInvocationChain} based on the given message context, endpoint, and * interceptors. Default implementation creates a simple {@code EndpointInvocationChain} based on the set * interceptors. * * @param endpoint the endpoint * @param interceptors the endpoint interceptors * @return the created invocation chain * @see #setInterceptors(org.springframework.ws.server.EndpointInterceptor[]) */ protected EndpointInvocationChain createEndpointInvocationChain(MessageContext messageContext, Object endpoint, EndpointInterceptor[] interceptors) { return new EndpointInvocationChain(endpoint, interceptors); }
/** * Creates a new {@code SoapEndpointInvocationChain} based on the delegate endpoint, the delegate interceptors, * and set actors/roles. * * @see #setActorsOrRoles(String[]) */ @Override public EndpointInvocationChain getEndpoint(MessageContext messageContext) throws Exception { EndpointInvocationChain delegateChain = delegate.getEndpoint(messageContext); if (delegateChain != null) { return new SoapEndpointInvocationChain(delegateChain.getEndpoint(), delegateChain.getInterceptors(), actorsOrRoles, isUltimateReceiver); } else { return null; } }
@Override public void afterCompletion(MessageContext messageContext, Object endpoint, Exception ex) throws Exception { getDelegate().afterCompletion(messageContext, endpoint, ex); } }
@Override public boolean handleRequest(MessageContext messageContext, Object endpoint) throws Exception { for (EndpointInterceptor interceptor : interceptors) { if (shouldIntercept(interceptor, messageContext, endpoint) && !interceptor.handleRequest(messageContext, endpoint)) { return false; } } return true; }
@Override public boolean handleFault(MessageContext messageContext, Object endpoint) throws Exception { for (EndpointInterceptor interceptor : interceptors) { if (shouldIntercept(interceptor, messageContext, endpoint) && !interceptor.handleFault(messageContext, endpoint)) { return false; } } return true; }
public boolean handleResponse(MessageContext messageContext) throws WebServiceClientException { try { return interceptor.handleResponse(messageContext, null); } catch (Exception e) { throw new ServerSideInterceptorWebServiceClientException(e); } }
@Override public void afterCompletion(MessageContext messageContext, Object endpoint, Exception ex) throws Exception { for (EndpointInterceptor interceptor : interceptors) { if (shouldIntercept(interceptor, messageContext, endpoint)) { interceptor.afterCompletion(messageContext, endpoint, ex); } } }
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { initEndpointAdapters(applicationContext); initEndpointExceptionResolvers(applicationContext); initEndpointMappings(applicationContext); }
/** * Creates a new <code>SoapEndpointInvocationChain</code> based on the delegate endpoint, the delegate interceptors, * and set actors/roles. * * @see #setActorsOrRoles(String[]) */ public EndpointInvocationChain getEndpoint(MessageContext messageContext) throws Exception { EndpointInvocationChain delegateChain = delegate.getEndpoint(messageContext); if (delegateChain != null) { return new SoapEndpointInvocationChain(delegateChain.getEndpoint(), delegateChain.getInterceptors(), actorsOrRoles, isUltimateReceiver); } else { return null; } }
@Override public void afterCompletion(MessageContext messageContext, Object endpoint, Exception ex) throws Exception { getDelegate().afterCompletion(messageContext, endpoint, ex); } }
public boolean handleRequest(MessageContext messageContext) throws WebServiceClientException { try { return interceptor.handleRequest(messageContext, null); } catch (Exception e) { throw new ServerSideInterceptorWebServiceClientException(e); } }
public boolean handleFault(MessageContext messageContext) throws WebServiceClientException { try { return interceptor.handleFault(messageContext, null); } catch (Exception e) { throw new ServerSideInterceptorWebServiceClientException(e); } }
/** * Creates a new {@code EndpointInvocationChain} based on the given message context, endpoint, and * interceptors. Default implementation creates a simple {@code EndpointInvocationChain} based on the set * interceptors. * * @param endpoint the endpoint * @param interceptors the endpoint interceptors * @return the created invocation chain * @see #setInterceptors(org.springframework.ws.server.EndpointInterceptor[]) */ protected EndpointInvocationChain createEndpointInvocationChain(MessageContext messageContext, Object endpoint, EndpointInterceptor[] interceptors) { return new EndpointInvocationChain(endpoint, interceptors); }
@Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { initEndpointAdapters(applicationContext); initEndpointExceptionResolvers(applicationContext); initEndpointMappings(applicationContext); }
@Override public void afterCompletion(MessageContext messageContext, Object endpoint, Exception ex) throws Exception { getDelegate().afterCompletion(messageContext, endpoint, ex); } }
/** * Creates a new {@code EndpointInvocationChain} based on the given message context, endpoint, and * interceptors. Default implementation creates a simple {@code EndpointInvocationChain} based on the set * interceptors. * * @param endpoint the endpoint * @param interceptors the endpoint interceptors * @return the created invocation chain * @see #setInterceptors(org.springframework.ws.server.EndpointInterceptor[]) */ protected EndpointInvocationChain createEndpointInvocationChain(MessageContext messageContext, Object endpoint, EndpointInterceptor[] interceptors) { return new EndpointInvocationChain(endpoint, interceptors); }
@Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { initEndpointAdapters(applicationContext); initEndpointExceptionResolvers(applicationContext); initEndpointMappings(applicationContext); }
/** * Creates a new <code>EndpointInvocationChain</code> based on the given message context, endpoint, and * interceptors. Default implementation creates a simple <code>EndpointInvocationChain</code> based on the set * interceptors. * * @param endpoint the endpoint * @param interceptors the endpoint interceptors * @return the created invocation chain * @see #setInterceptors(org.springframework.ws.server.EndpointInterceptor[]) */ protected EndpointInvocationChain createEndpointInvocationChain(MessageContext messageContext, Object endpoint, EndpointInterceptor[] interceptors) { return new EndpointInvocationChain(endpoint, interceptors); }