本文整理了Java中org.apache.cxf.binding.Binding.getInInterceptors()
方法的一些代码示例,展示了Binding.getInInterceptors()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Binding.getInInterceptors()
方法的具体详情如下:
包路径:org.apache.cxf.binding.Binding
类名称:Binding
方法名:getInInterceptors
暂无
代码示例来源: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
public void startServer(Server server) {
if (server.getEndpoint().getBinding() instanceof SoapBinding) {
//found a SOAP binding, add the javascript generation interceptor
server.getEndpoint().getBinding().getInInterceptors().add(JavascriptGetInterceptor.INSTANCE);
}
}
代码示例来源:origin: apache/cxf
@Override
public void initialize(Client client, Bus bus) {
removeDatabindingInterceptor(client.getEndpoint().getBinding().getInInterceptors());
}
代码示例来源:origin: apache/cxf
@Override
public void initialize(Server server, Bus bus) {
removeDatabindingInterceptor(server.getEndpoint().getBinding().getInInterceptors());
}
代码示例来源:origin: org.apache.cxf/cxf-core
@Override
public void initialize(Client client, Bus bus) {
removeDatabindingInterceptor(client.getEndpoint().getBinding().getInInterceptors());
}
代码示例来源:origin: org.apache.cxf/cxf-core
@Override
public void initialize(Server server, Bus bus) {
removeDatabindingInterceptor(server.getEndpoint().getBinding().getInInterceptors());
}
代码示例来源:origin: org.apache.cxf/cxf-rt-core
@Override
public void initialize(Client client, Bus bus) {
removeDatabindingInterceptor(client.getEndpoint().getBinding().getInInterceptors());
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
@Override
public void initialize(Client client, Bus bus) {
removeDatabindingInterceptor(client.getEndpoint().getBinding().getInInterceptors());
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
@Override
public void initialize(Server server, Bus bus) {
removeDatabindingInterceptor(server.getEndpoint().getBinding().getInInterceptors());
}
代码示例来源:origin: org.apache.cxf/cxf-rt-core
@Override
public void initialize(Server server, Bus bus) {
removeDatabindingInterceptor(server.getEndpoint().getBinding().getInInterceptors());
}
代码示例来源: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.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.camel/camel-cxf
@Override
public void initialize(Client client, Bus bus) {
client.getEndpoint().put("org.apache.cxf.binding.soap.addNamespaceContext", "true");
removeFaultInInterceptorFromClient(client);
// Need to remove some interceptors that are incompatible
// We don't support JAX-WS Holders for PAYLOAD (not needed anyway)
// and thus we need to remove those interceptors to prevent Holder
// object from being created and stuck into the contents list
// instead of Source objects
removeInterceptor(client.getEndpoint().getInInterceptors(),
HolderInInterceptor.class);
removeInterceptor(client.getEndpoint().getOutInterceptors(),
HolderOutInterceptor.class);
// The SoapHeaderInterceptor maps various headers onto method parameters.
// At this point, we expect all the headers to remain as headers, not
// part of the body, so we remove that one.
removeInterceptor(client.getEndpoint().getBinding().getInInterceptors(),
SoapHeaderInterceptor.class);
client.getEndpoint().getBinding().getInInterceptors().add(new ConfigureDocLitWrapperInterceptor(true));
resetPartTypes(client.getEndpoint().getBinding());
LOG.info("Initialized CXF Client: {} in Payload mode with allow streaming: {}", client, allowStreaming);
}
代码示例来源: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.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: org.apache.openejb/openejb-cxf
protected void init() {
// configure handlers
try {
initHandlers();
} catch (final Exception e) {
throw new WebServiceException("Error configuring handlers", e);
}
// Set service to invoke the target ejb
service.setInvoker(new EjbMethodInvoker(this.bus, beanContext));
// Remove interceptors that perform handler processing since
// handler processing must happen within the EJB container.
final Endpoint endpoint = getEndpoint();
removeHandlerInterceptors(bus.getInInterceptors());
removeHandlerInterceptors(endpoint.getInInterceptors());
removeHandlerInterceptors(endpoint.getBinding().getInInterceptors());
removeHandlerInterceptors(endpoint.getService().getInInterceptors());
// Install SAAJ interceptor
if (endpoint.getBinding() instanceof SoapBinding && !this.implInfo.isWebServiceProvider()) {
endpoint.getService().getInInterceptors().add(new SAAJInInterceptor());
}
// Install WSS4J interceptor
ConfigureCxfSecurity.configure(endpoint, port);
}
代码示例来源:origin: apache/cxf
public void handleMessage(Message message) throws Fault {
Exchange ex = message.getExchange();
Set<Endpoint> endpoints = CastUtils.cast((Set<?>)ex.get(MultipleEndpointObserver.ENDPOINTS));
Endpoint ep = selectEndpoint(message, endpoints);
if (ep == null) {
return;
}
ex.put(Endpoint.class, ep);
ex.put(Binding.class, ep.getBinding());
ex.put(Service.class, ep.getService());
InterceptorChain chain = message.getInterceptorChain();
chain.add(ep.getInInterceptors());
chain.add(ep.getBinding().getInInterceptors());
chain.add(ep.getService().getInInterceptors());
chain.setFaultObserver(ep.getOutFaultObserver());
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
public void handleMessage(Message message) throws Fault {
Exchange ex = message.getExchange();
Set<Endpoint> endpoints = CastUtils.cast((Set<?>)ex.get(MultipleEndpointObserver.ENDPOINTS));
Endpoint ep = selectEndpoint(message, endpoints);
if (ep == null) {
return;
}
ex.put(Endpoint.class, ep);
ex.put(Binding.class, ep.getBinding());
ex.put(Service.class, ep.getService());
InterceptorChain chain = message.getInterceptorChain();
chain.add(ep.getInInterceptors());
chain.add(ep.getBinding().getInInterceptors());
chain.add(ep.getService().getInInterceptors());
chain.setFaultObserver(ep.getOutFaultObserver());
}
代码示例来源:origin: org.apache.cxf/cxf-api
public void handleMessage(Message message) throws Fault {
Exchange ex = message.getExchange();
Set<Endpoint> endpoints = CastUtils.cast((Set<?>)ex.get(MultipleEndpointObserver.ENDPOINTS));
Endpoint ep = selectEndpoint(message, endpoints);
if (ep == null) {
return;
}
ex.put(Endpoint.class, ep);
ex.put(Binding.class, ep.getBinding());
ex.put(Service.class, ep.getService());
InterceptorChain chain = message.getInterceptorChain();
chain.add(ep.getInInterceptors());
chain.add(ep.getBinding().getInInterceptors());
chain.add(ep.getService().getInInterceptors());
chain.setFaultObserver(ep.getOutFaultObserver());
}
内容来源于网络,如有侵权,请联系作者删除!