org.apache.cxf.binding.Binding.getOutInterceptors()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(13.5k)|赞(0)|评价(0)|浏览(123)

本文整理了Java中org.apache.cxf.binding.Binding.getOutInterceptors()方法的一些代码示例,展示了Binding.getOutInterceptors()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Binding.getOutInterceptors()方法的具体详情如下:
包路径:org.apache.cxf.binding.Binding
类名称:Binding
方法名:getOutInterceptors

Binding.getOutInterceptors介绍

暂无

代码示例

代码示例来源:origin: org.apache.servicemix/servicemix-cxf-bc

private void removeDatabindingInterceptprs() {
  for (Interceptor interceptor : ep.getBinding().getInInterceptors()) {
    if (interceptor.getClass().getName().equals("org.apache.cxf.interceptor.DocLiteralInInterceptor")
      || interceptor.getClass().getName().equals("org.apache.cxf.binding.soap.interceptor.SoapHeaderInterceptor")
      || interceptor.getClass().getName().equals("org.apache.cxf.binding.soap.interceptor.RPCInInterceptor")) {
      ep.getBinding().getInInterceptors().remove(interceptor);
    }
  }
  
  for (Interceptor interceptor : ep.getBinding().getOutInterceptors()) {
    if (interceptor.getClass().getName().equals("org.apache.cxf.interceptor.WrappedOutInterceptor")
      || interceptor.getClass().getName().equals("org.apache.cxf.interceptor.BareOutInterceptor")) {
      ep.getBinding().getOutInterceptors().remove(interceptor);
    }
  }
}

代码示例来源:origin: org.mule.services/mule-service-soap

private void removeUnnecessaryCxfInterceptors(Client client) {
 Binding binding = client.getEndpoint().getBinding();
 removeInterceptor(binding.getOutInterceptors(), WrappedOutInterceptor.class.getName());
 removeInterceptor(binding.getInInterceptors(), Soap11FaultInInterceptor.class.getName());
 removeInterceptor(binding.getInInterceptors(), Soap12FaultInInterceptor.class.getName());
 removeInterceptor(binding.getInInterceptors(), CheckFaultInterceptor.class.getName());
}

代码示例来源:origin: apache/cxf

/**
 * @param endpoint
 * @param cache
 * @return
 */
protected PhaseInterceptorChain buildRetransmitChain(final Endpoint endpoint, PhaseChainCache cache) {
  PhaseInterceptorChain retransmitChain;
  Bus bus = getManager().getBus();
  List<Interceptor<? extends Message>> i1 = bus.getOutInterceptors();
  if (LOG.isLoggable(Level.FINE)) {
    LOG.fine("Interceptors contributed by bus: " + i1);
  }
  List<Interceptor<? extends Message>> i2 = endpoint.getOutInterceptors();
  if (LOG.isLoggable(Level.FINE)) {
    LOG.fine("Interceptors contributed by endpoint: " + i2);
  }
  List<Interceptor<? extends Message>> i3 = endpoint.getBinding().getOutInterceptors();
  if (LOG.isLoggable(Level.FINE)) {
    LOG.fine("Interceptors contributed by binding: " + i3);
  }
  PhaseManager pm = bus.getExtension(PhaseManager.class);
  retransmitChain = cache.get(pm.getOutPhases(), i1, i2, i3);
  return retransmitChain;
}

代码示例来源:origin: apache/cxf

protected PhaseInterceptorChain setupInterceptorChain(Endpoint endpoint) {
  PhaseManager pm = bus.getExtension(PhaseManager.class);
  List<Interceptor<? extends Message>> i1 = bus.getOutInterceptors();
  if (LOG.isLoggable(Level.FINE)) {
    LOG.fine("Interceptors contributed by bus: " + i1);
  }
  List<Interceptor<? extends Message>> i2 = getOutInterceptors();
  if (LOG.isLoggable(Level.FINE)) {
    LOG.fine("Interceptors contributed by client: " + i2);
  }
  List<Interceptor<? extends Message>> i3 = endpoint.getOutInterceptors();
  if (LOG.isLoggable(Level.FINE)) {
    LOG.fine("Interceptors contributed by endpoint: " + i3);
  }
  List<Interceptor<? extends Message>> i4 = endpoint.getBinding().getOutInterceptors();
  if (LOG.isLoggable(Level.FINE)) {
    LOG.fine("Interceptors contributed by binding: " + i4);
  }
  List<Interceptor<? extends Message>> i5 = null;
  if (endpoint.getService().getDataBinding() instanceof InterceptorProvider) {
    i5 = ((InterceptorProvider)endpoint.getService().getDataBinding()).getOutInterceptors();
    if (LOG.isLoggable(Level.FINE)) {
      LOG.fine("Interceptors contributed by databinding: " + i5);
    }
  }
  if (i5 != null) {
    return outboundChainCache.get(pm.getOutPhases(), i1, i2, i3, i4, i5);
  }
  return outboundChainCache.get(pm.getOutPhases(), i1, i2, i3, i4);
}

代码示例来源:origin: org.mule.modules/mule-module-cxf

/**
 * When the binding style is RPC we need to replace the default interceptors to avoid truncating the content.
 */
private void replaceRPCInterceptors(Server server)
{
  if(CxfUtils.removeInterceptor(server.getEndpoint().getBinding().getInInterceptors(), RPCInInterceptor.class.getName()))
  {
    server.getEndpoint().getBinding().getInInterceptors().add(new ProxyRPCInInterceptor());
  }
  if(CxfUtils.removeInterceptor(server.getEndpoint().getBinding().getOutInterceptors(), RPCOutInterceptor.class.getName()))
  {
    server.getEndpoint().getBinding().getOutInterceptors().add(new BareOutInterceptor());
  }
}

代码示例来源:origin: org.apache.cxf/cxf-core

protected PhaseInterceptorChain setupInterceptorChain(Endpoint endpoint) {
  PhaseManager pm = bus.getExtension(PhaseManager.class);
  List<Interceptor<? extends Message>> i1 = bus.getOutInterceptors();
  if (LOG.isLoggable(Level.FINE)) {
    LOG.fine("Interceptors contributed by bus: " + i1);
  }
  List<Interceptor<? extends Message>> i2 = getOutInterceptors();
  if (LOG.isLoggable(Level.FINE)) {
    LOG.fine("Interceptors contributed by client: " + i2);
  }
  List<Interceptor<? extends Message>> i3 = endpoint.getOutInterceptors();
  if (LOG.isLoggable(Level.FINE)) {
    LOG.fine("Interceptors contributed by endpoint: " + i3);
  }
  List<Interceptor<? extends Message>> i4 = endpoint.getBinding().getOutInterceptors();
  if (LOG.isLoggable(Level.FINE)) {
    LOG.fine("Interceptors contributed by binding: " + i4);
  }
  List<Interceptor<? extends Message>> i5 = null;
  if (endpoint.getService().getDataBinding() instanceof InterceptorProvider) {
    i5 = ((InterceptorProvider)endpoint.getService().getDataBinding()).getOutInterceptors();
    if (LOG.isLoggable(Level.FINE)) {
      LOG.fine("Interceptors contributed by databinding: " + i5);
    }
  }
  if (i5 != null) {
    return outboundChainCache.get(pm.getOutPhases(), i1, i2, i3, i4, i5);
  }
  return outboundChainCache.get(pm.getOutPhases(), i1, i2, i3, i4);
}

代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs

protected PhaseInterceptorChain setupInterceptorChain(Endpoint endpoint) {
  PhaseManager pm = bus.getExtension(PhaseManager.class);
  List<Interceptor<? extends Message>> i1 = bus.getOutInterceptors();
  if (LOG.isLoggable(Level.FINE)) {
    LOG.fine("Interceptors contributed by bus: " + i1);
  }
  List<Interceptor<? extends Message>> i2 = getOutInterceptors();
  if (LOG.isLoggable(Level.FINE)) {
    LOG.fine("Interceptors contributed by client: " + i2);
  }
  List<Interceptor<? extends Message>> i3 = endpoint.getOutInterceptors();
  if (LOG.isLoggable(Level.FINE)) {
    LOG.fine("Interceptors contributed by endpoint: " + i3);
  }
  List<Interceptor<? extends Message>> i4 = endpoint.getBinding().getOutInterceptors();
  if (LOG.isLoggable(Level.FINE)) {
    LOG.fine("Interceptors contributed by binding: " + i4);
  }
  List<Interceptor<? extends Message>> i5 = null;
  if (endpoint.getService().getDataBinding() instanceof InterceptorProvider) {
    i5 = ((InterceptorProvider)endpoint.getService().getDataBinding()).getOutInterceptors();
    if (LOG.isLoggable(Level.FINE)) {
      LOG.fine("Interceptors contributed by databinding: " + i5);
    }
  }
  if (i5 != null) {
    return outboundChainCache.get(pm.getOutPhases(), i1, i2, i3, i4, i5);
  }
  return outboundChainCache.get(pm.getOutPhases(), i1, i2, i3, i4);
}

代码示例来源:origin: org.apache.cxf/cxf-api

protected PhaseInterceptorChain setupInterceptorChain(Endpoint endpoint) {
  PhaseManager pm = bus.getExtension(PhaseManager.class);
  List<Interceptor<? extends Message>> i1 = bus.getOutInterceptors();
  if (LOG.isLoggable(Level.FINE)) {
    LOG.fine("Interceptors contributed by bus: " + i1);
  }
  List<Interceptor<? extends Message>> i2 = getOutInterceptors();
  if (LOG.isLoggable(Level.FINE)) {
    LOG.fine("Interceptors contributed by client: " + i2);
  }
  List<Interceptor<? extends Message>> i3 = endpoint.getOutInterceptors();
  if (LOG.isLoggable(Level.FINE)) {
    LOG.fine("Interceptors contributed by endpoint: " + i3);
  }
  List<Interceptor<? extends Message>> i4 = endpoint.getBinding().getOutInterceptors();
  if (LOG.isLoggable(Level.FINE)) {
    LOG.fine("Interceptors contributed by binding: " + i4);
  }
  List<Interceptor<? extends Message>> i5 = null;
  if (endpoint.getService().getDataBinding() instanceof InterceptorProvider) {
    i5 = ((InterceptorProvider)endpoint.getService().getDataBinding()).getOutInterceptors();
    if (LOG.isLoggable(Level.FINE)) {
      LOG.fine("Interceptors contributed by databinding: " + i5);
    }
  }
  if (i5 != null) {
    return outboundChainCache.get(pm.getOutPhases(), i1, i2, i3, i4, i5);
  }
  return outboundChainCache.get(pm.getOutPhases(), i1, i2, i3, i4);
}

代码示例来源:origin: apache/cxf

il = binding.getOutInterceptors();
if (LOG.isLoggable(Level.FINE)) {
  LOG.fine("Interceptors contributed by binding: " + il);

代码示例来源:origin: org.apache.cxf/cxf-core

il = binding.getOutInterceptors();
if (LOG.isLoggable(Level.FINE)) {
  LOG.fine("Interceptors contributed by binding: " + il);

代码示例来源:origin: org.apache.cxf/cxf-api

il = binding.getOutInterceptors();
if (LOG.isLoggable(Level.FINE)) {
  LOG.fine("Interceptors contributed by binding: " + il);

代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs

il = binding.getOutInterceptors();
if (LOG.isLoggable(Level.FINE)) {
  LOG.fine("Interceptors contributed by binding: " + il);

代码示例来源:origin: org.apache.camel/camel-cxf

@Override
public void initialize(Client client, Bus bus) {
  //check if there is logging interceptor
  removeInterceptorWhichIsOutThePhases(client.getInInterceptors(), REMAINING_IN_PHASES, getInInterceptorNames());
  removeInterceptorWhichIsOutThePhases(client.getEndpoint().getInInterceptors(), REMAINING_IN_PHASES, getInInterceptorNames());
  client.getEndpoint().getBinding().getInInterceptors().clear();
  //we need to keep the LoggingOutputInterceptor
  getOutInterceptorNames().add(LoggingOutInterceptor.class.getName());
  removeInterceptorWhichIsOutThePhases(client.getOutInterceptors(), REMAINING_OUT_PHASES, getOutInterceptorNames());
  removeInterceptorWhichIsOutThePhases(client.getEndpoint().getOutInterceptors(), REMAINING_OUT_PHASES, getOutInterceptorNames());
  client.getEndpoint().getBinding().getOutInterceptors().clear();
  client.getEndpoint().getOutInterceptors().add(new RawMessageContentRedirectInterceptor());
}

代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs

i4 = binding.getOutInterceptors();
if (LOG.isLoggable(Level.FINE)) {
  LOG.fine("Interceptors contributed by binding: " + i4);

代码示例来源:origin: org.mule.modules/mule-module-cxf

@Override
protected void configureServer(Server server)
{
  if (isProxyEnvelope())
  {
    CxfUtils.removeInterceptor(server.getEndpoint().getBinding().getOutInterceptors(), SoapOutInterceptor.class.getName());
  }
  CxfUtils.removeInterceptor(server.getEndpoint().getBinding().getInInterceptors(), MustUnderstandInterceptor.class.getName());
  replaceRPCInterceptors(server);
  if (isValidationEnabled())
  {
    server.getEndpoint().getInInterceptors().add(new ProxySchemaValidationInInterceptor(getConfiguration().getCxfBus(), server.getEndpoint(),
        server.getEndpoint().getService().getServiceInfos().get(0)));
  }
}

代码示例来源:origin: org.mule.modules/mule-module-cxf

CxfUtils.removeInterceptor(binding.getOutInterceptors(), WrappedOutInterceptor.class.getName());
CxfUtils.removeInterceptor(binding.getInInterceptors(), Soap11FaultInInterceptor.class.getName());
CxfUtils.removeInterceptor(binding.getInInterceptors(), Soap12FaultInInterceptor.class.getName());
  CxfUtils.removeInterceptor(binding.getOutInterceptors(), SoapOutInterceptor.class.getName());
  client.getInInterceptors().add(new ReversibleStaxInInterceptor());
  client.getInInterceptors().add(new ResetStaxInterceptor());

代码示例来源:origin: org.ow2.chameleon.fuchsia.base.protobuffer/org.ow2.chameleon.fuchsia.base.protobuffer.cxf-protobuf

protected InterceptorChain setupInterceptorChain(Exchange exchange) {
  if (outgoingInterceptorChain != null) {
    return outgoingInterceptorChain;
  }
  Endpoint endpoint = getEndpoint(exchange);
  PhaseManager pm = bus.getExtension(PhaseManager.class);
  @SuppressWarnings("unchecked")
  List<Interceptor<? extends org.apache.cxf.message.Message>> i1 = bus.getOutInterceptors();
  @SuppressWarnings("unchecked")
  List<Interceptor<? extends org.apache.cxf.message.Message>> i2 = endpoint.getOutInterceptors();
  @SuppressWarnings("unchecked")
  List<Interceptor<? extends org.apache.cxf.message.Message>> i3 = getOutInterceptors();
  @SuppressWarnings("unchecked")
  List<Interceptor<? extends org.apache.cxf.message.Message>> i4 = endpoint.getBinding().getOutInterceptors();
  PhaseInterceptorChain phaseInterceptorChain = outboundChainCache.get(pm
      .getOutPhases(), i1, i2, i3, i4);
  return phaseInterceptorChain;
}

代码示例来源:origin: org.apache.camel/camel-cxf

server.getEndpoint().getBinding().getOutInterceptors().clear();
server.getEndpoint().getOutInterceptors().add(new RawMessageContentRedirectInterceptor());

代码示例来源:origin: org.apache.camel/camel-cxf

@Override
public void initialize(Server server, Bus bus) {
  server.getEndpoint().put("org.apache.cxf.binding.soap.addNamespaceContext", "true");
  server.getEndpoint().getBinding().getInInterceptors().add(new ConfigureDocLitWrapperInterceptor(true));
  if (server.getEndpoint().getBinding() instanceof SoapBinding) {
    server.getEndpoint().getBinding().getOutInterceptors().add(new SetSoapVersionInterceptor());
  }
  // Need to remove some interceptors that are incompatible
  // See above.
  removeInterceptor(server.getEndpoint().getInInterceptors(), 
           HolderInInterceptor.class);
  removeInterceptor(server.getEndpoint().getOutInterceptors(), 
           HolderOutInterceptor.class);
  removeInterceptor(server.getEndpoint().getBinding().getInInterceptors(), 
           SoapHeaderInterceptor.class);
  resetPartTypes(server.getEndpoint().getBinding());
  LOG.info("Initialized CXF Server: {} in Payload mode with allow streaming: {}", server, allowStreaming);
}

代码示例来源:origin: apache/cxf

jaxwsEndpoint.getBinding().getOutInterceptors().add(new TestAttachmentOutInterceptor());
jaxwsEndpoint.getBinding().getOutInterceptors().add(new LoggingOutInterceptor());

相关文章