protected void initializeInterceptors(Exchange ex, PhaseInterceptorChain chain) { Endpoint e = ex.get(Endpoint.class); Client c = ex.get(Client.class); chain.add(getBus().getOutFaultInterceptors()); if (c != null) { chain.add(c.getOutFaultInterceptors()); } chain.add(e.getService().getOutFaultInterceptors()); chain.add(e.getOutFaultInterceptors()); chain.add(e.getBinding().getOutFaultInterceptors()); if (e.getService().getDataBinding() instanceof InterceptorProvider) { chain.add(((InterceptorProvider)e.getService().getDataBinding()).getOutFaultInterceptors()); } addToChain(chain, ex.getInMessage()); addToChain(chain, ex.getOutFaultMessage()); } private void addToChain(PhaseInterceptorChain chain, Message m) {
protected void initializeInterceptors(Exchange ex, PhaseInterceptorChain chain) { Endpoint e = ex.getEndpoint(); Client c = ex.get(Client.class); chain.add(getBus().getOutFaultInterceptors()); if (c != null) { chain.add(c.getOutFaultInterceptors()); } chain.add(e.getService().getOutFaultInterceptors()); chain.add(e.getOutFaultInterceptors()); chain.add(e.getBinding().getOutFaultInterceptors()); if (e.getService().getDataBinding() instanceof InterceptorProvider) { chain.add(((InterceptorProvider)e.getService().getDataBinding()).getOutFaultInterceptors()); } addToChain(chain, ex.getInMessage()); addToChain(chain, ex.getOutFaultMessage()); } private void addToChain(PhaseInterceptorChain chain, Message m) {
protected void initializeInterceptors(Exchange ex, PhaseInterceptorChain chain) { Endpoint e = ex.get(Endpoint.class); Client c = ex.get(Client.class); chain.add(getBus().getOutFaultInterceptors()); if (c != null) { chain.add(c.getOutFaultInterceptors()); } chain.add(e.getService().getOutFaultInterceptors()); chain.add(e.getOutFaultInterceptors()); chain.add(e.getBinding().getOutFaultInterceptors()); if (e.getService().getDataBinding() instanceof InterceptorProvider) { chain.add(((InterceptorProvider)e.getService().getDataBinding()).getOutFaultInterceptors()); } addToChain(chain, ex.getInMessage()); addToChain(chain, ex.getOutFaultMessage()); } private void addToChain(PhaseInterceptorChain chain, Message m) {
protected void initializeInterceptors(Exchange ex, PhaseInterceptorChain chain) { Endpoint e = ex.getEndpoint(); Client c = ex.get(Client.class); chain.add(getBus().getOutFaultInterceptors()); if (c != null) { chain.add(c.getOutFaultInterceptors()); } chain.add(e.getService().getOutFaultInterceptors()); chain.add(e.getOutFaultInterceptors()); chain.add(e.getBinding().getOutFaultInterceptors()); if (e.getService().getDataBinding() instanceof InterceptorProvider) { chain.add(((InterceptorProvider)e.getService().getDataBinding()).getOutFaultInterceptors()); } addToChain(chain, ex.getInMessage()); addToChain(chain, ex.getOutFaultMessage()); } private void addToChain(PhaseInterceptorChain chain, Message m) {
removeInterceptor(ClientProxy.getClient(proxy).getEndpoint().getBinding().getOutInterceptors(), "SoapOutInterceptor"); removeInterceptor(ClientProxy.getClient(proxy).getEndpoint().getBinding().getOutFaultInterceptors(), "SoapOutInterceptor"); removeInterceptor(ClientProxy.getClient(proxy).getEndpoint().getBinding().getOutInterceptors(), ClearClientResponseContextInterceptor clearClientResponseContextInterceptor = new ClearClientResponseContextInterceptor(ClientProxy.getClient(proxy)); ClientProxy.getClient(proxy).getEndpoint().getBinding().getOutInterceptors().add(clearClientResponseContextInterceptor); ClientProxy.getClient(proxy).getEndpoint().getBinding().getOutFaultInterceptors().add(clearClientResponseContextInterceptor);
removeInterceptor(server.getEndpoint().getBinding().getInFaultInterceptors(), "ReadHeadersInterceptor"); removeInterceptor(server.getEndpoint().getBinding().getOutInterceptors(), "SoapOutInterceptor"); removeInterceptor(server.getEndpoint().getBinding().getOutFaultInterceptors(), "SoapOutInterceptor"); removeInterceptor(server.getEndpoint().getBinding().getOutInterceptors(), "StaxOutInterceptor");