Search in sources :

Example 1 with SetSoapVersionInterceptor

use of org.apache.camel.component.cxf.interceptors.SetSoapVersionInterceptor in project camel by apache.

the class PayLoadDataFormatFeature method initialize.

@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);
}
Also used : SetSoapVersionInterceptor(org.apache.camel.component.cxf.interceptors.SetSoapVersionInterceptor) ConfigureDocLitWrapperInterceptor(org.apache.camel.component.cxf.interceptors.ConfigureDocLitWrapperInterceptor) SoapBinding(org.apache.cxf.binding.soap.SoapBinding)

Aggregations

ConfigureDocLitWrapperInterceptor (org.apache.camel.component.cxf.interceptors.ConfigureDocLitWrapperInterceptor)1 SetSoapVersionInterceptor (org.apache.camel.component.cxf.interceptors.SetSoapVersionInterceptor)1 SoapBinding (org.apache.cxf.binding.soap.SoapBinding)1