use of org.apache.cxf.binding.soap.SoapBinding in project camel by apache.
the class CXFMessageDataFormatFeature method setupEndpoint.
protected void setupEndpoint(Endpoint ep) {
resetPartTypes(ep.getBinding());
Class<?> fmt = Source.class;
if (ep.getBinding() instanceof SoapBinding) {
ep.getInInterceptors().add(new SAAJInInterceptor());
SAAJOutInterceptor out = new SAAJOutInterceptor();
ep.getOutInterceptors().add(out);
ep.getOutInterceptors().add(new CxfMessageSoapHeaderOutInterceptor());
ep.getOutInterceptors().add(new MessageModeOutInterceptor(out, ep.getBinding().getBindingInfo().getName()));
fmt = SOAPMessage.class;
} else {
ep.getOutInterceptors().add(new MessageModeOutInterceptor(Source.class, ep.getBinding().getBindingInfo().getName()));
}
ep.getInInterceptors().add(new MessageModeInInterceptor(fmt, ep.getBinding().getBindingInfo().getName()));
ep.put(AbstractInDatabindingInterceptor.NO_VALIDATE_PARTS, Boolean.TRUE);
// need to remove the wrapper class and holder interceptor
removeInterceptors(ep.getInInterceptors(), REMOVING_IN_INTERCEPTORS);
removeInterceptors(ep.getOutInterceptors(), REMOVING_OUT_INTERCEPTORS);
}
use of org.apache.cxf.binding.soap.SoapBinding 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);
}
use of org.apache.cxf.binding.soap.SoapBinding in project tomee by apache.
the class EjbEndpoint method init.
protected void init() {
// configure handlers
try {
initHandlers();
} catch (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.
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);
}
Aggregations