/** * Processes response using interceptors. * @param messageContext * @throws IOException */ protected void handleResponse(MessageContext messageContext) throws IOException { if (!interceptors.isEmpty()) { boolean hasFault = hasFault(messageContext); for (EndpointInterceptor interceptor:interceptors) { try { if (!hasFault) { if (!interceptor.handleResponse(messageContext, null)) return; } else { if (!interceptor.handleFault(messageContext, null)) return; } } catch (Exception e) { throw new IOException("Unexpected exception",e); } } } } /**
/** * Iterates over all interceptors. If one of them returns false, false is returned. True is returned otherwise. * @param messageContext * @return * @throws IOException */ protected boolean handleRequest(MessageContext messageContext) throws IOException { for (EndpointInterceptor interceptor:interceptors) { try { if (!interceptor.handleRequest(messageContext, null)) { return false; } } catch (Exception e) { throw new IOException("Unexpected exception",e); } } return true; }
@Override public void afterCompletion(MessageContext messageContext, Object endpoint, Exception ex) throws Exception { getDelegate().afterCompletion(messageContext, endpoint, ex); } }
@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); } }
public boolean handleFault(MessageContext messageContext) throws WebServiceClientException { try { return interceptor.handleFault(messageContext, null); } catch (Exception e) { throw new ServerSideInterceptorWebServiceClientException(e); } }
@Override public boolean handleResponse(MessageContext messageContext, Object endpoint) throws Exception { for (EndpointInterceptor interceptor : interceptors) { if (shouldIntercept(interceptor, messageContext, endpoint) && !interceptor.handleResponse(messageContext, endpoint)) { return false; } } return true; }
EndpointInterceptor interceptor = mappedEndpoint.getInterceptors()[i]; if (!hasFault) { resume = interceptor.handleResponse(messageContext, mappedEndpoint.getEndpoint()); resume = interceptor.handleFault(messageContext, mappedEndpoint.getEndpoint());
@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; }
public boolean handleFault(MessageContext messageContext, Object endpoint) throws Exception { return getDelegate().handleFault(messageContext, endpoint); } }
@Override public boolean handleResponse(MessageContext messageContext, Object endpoint) throws Exception { return getDelegate().handleResponse(messageContext, endpoint); }
@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); } } }
EndpointInterceptor interceptor = mappedEndpoint.getInterceptors()[i]; if (!hasFault) { resume = interceptor.handleResponse(messageContext, mappedEndpoint.getEndpoint()); resume = interceptor.handleFault(messageContext, mappedEndpoint.getEndpoint());
public boolean handleRequest(MessageContext messageContext) throws WebServiceClientException { try { return interceptor.handleRequest(messageContext, null); } catch (Exception e) { throw new ServerSideInterceptorWebServiceClientException(e); } }
@Override public boolean handleFault(MessageContext messageContext, Object endpoint) throws Exception { return getDelegate().handleFault(messageContext, endpoint); }
@Override public boolean handleResponse(MessageContext messageContext, Object endpoint) throws Exception { return getDelegate().handleResponse(messageContext, endpoint); }
@Override public void afterCompletion(MessageContext messageContext, Object endpoint, Exception ex) throws Exception { getDelegate().afterCompletion(messageContext, endpoint, ex); } }
EndpointInterceptor interceptor = mappedEndpoint.getInterceptors()[i]; if (!hasFault) { resume = interceptor.handleResponse(messageContext, mappedEndpoint.getEndpoint()); resume = interceptor.handleFault(messageContext, mappedEndpoint.getEndpoint());
@Override public boolean handleRequest(MessageContext messageContext, Object endpoint) throws Exception { return getDelegate().handleRequest(messageContext, endpoint); }
@Override public boolean handleFault(MessageContext messageContext, Object endpoint) throws Exception { return getDelegate().handleFault(messageContext, endpoint); }