public void handleMessage(Message message) throws Fault { message.getInterceptorChain().remove(StaxInEndingInterceptor.INSTANCE); } }
public void handleMessage(Message message) throws Fault { message.getInterceptorChain().remove(StaxInEndingInterceptor.INSTANCE); } }
protected void cleanUpOutInterceptors(Message outMessage) { // TODO - how can I improve this to provide a specific interceptor chain that just has the // stax, gzip and message sender components, while also ensuring that GZIP is only provided // if its already configured for the endpoint. Iterator<Interceptor<? extends Message>> iterator = outMessage.getInterceptorChain().iterator(); while (iterator.hasNext()) { Interceptor<? extends Message> inInterceptor = iterator.next(); if (!inInterceptor.getClass().equals(StaxOutInterceptor.class) && !inInterceptor.getClass().equals(GZIPOutInterceptor.class) && !inInterceptor.getClass().equals(MessageSenderInterceptor.class)) { outMessage.getInterceptorChain().remove(inInterceptor); } } }
protected void cleanUpOutInterceptors(Message outMessage) { // TODO - how can I improve this to provide a specific interceptor chain that just has the // stax, gzip and message sender components, while also ensuring that GZIP is only provided // if its already configured for the endpoint. Iterator<Interceptor<? extends Message>> iterator = outMessage.getInterceptorChain().iterator(); while (iterator.hasNext()) { Interceptor<? extends Message> inInterceptor = iterator.next(); if (!inInterceptor.getClass().equals(StaxOutInterceptor.class) && !inInterceptor.getClass().equals(GZIPOutInterceptor.class) && !inInterceptor.getClass().equals(MessageSenderInterceptor.class)) { outMessage.getInterceptorChain().remove(inInterceptor); } } }
public static void removeUnusedInterceptprs(Message message) { if (message.getInterceptorChain() != null) { for (Interceptor interceptor : message.getInterceptorChain()) { if (interceptor.getClass().getName().equals( "org.apache.cxf.interceptor.AttachmentOutInterceptor")) { message.getInterceptorChain().remove(interceptor); } } } }
@Override public void handleMessage(Message message) { super.handleMessage(message); Interceptor<? extends Message> defaultInterceptor = null; for (Iterator<Interceptor<? extends Message>> iterator = message.getInterceptorChain().getIterator(); iterator.hasNext();) { Interceptor<? extends Message> interceptor = iterator.next(); if (interceptor instanceof BareOutInterceptor) { defaultInterceptor = interceptor; } } message.getInterceptorChain().remove(defaultInterceptor); }
@Override public void handleMessage(SoapMessage message) { Interceptor<? extends Message> soapActionInInterceptor = null; Iterator<Interceptor<? extends Message>> iterator = message.getInterceptorChain().getIterator(); while (iterator.hasNext()) { Interceptor<? extends Message> interceptor = iterator.next(); if (interceptor instanceof SoapActionInInterceptor) { soapActionInInterceptor = interceptor; break; } } if (soapActionInInterceptor != null) { message.getInterceptorChain().remove(soapActionInInterceptor); } } }
PhaseInterceptor pi = (PhaseInterceptor)it.next(); if (MessageSenderInterceptor.class.getName().equals(pi.getId())) { chain.remove(pi); LOG.fine("Removed MessageSenderInterceptor from interceptor chain."); break;
message.getInterceptorChain().remove(this);
message.getInterceptorChain().remove(this);
Interceptor<? extends Message> incept = iterator.next(); if (incept.getClass().getName().equals(RMCaptureInInterceptor.class.getName())) { chain.remove(incept);
message.getInterceptorChain().remove(StaxInEndingInterceptor.INSTANCE); message.getInterceptorChain().add(new StaxInEndingInterceptor(Phase.POST_INVOKE));
message.getInterceptorChain().remove(StaxInEndingInterceptor.INSTANCE); message.getInterceptorChain().add(new StaxInEndingInterceptor(Phase.POST_INVOKE));
mout.getInterceptorChain().remove(inInterceptor);
if (chain != null) { for (Interceptor<?> interceptor : chain) { chain.remove(interceptor);