cxfBuilder.getOutInterceptors().add(new WSS4JOutInterceptor(configProperties));
}
CxfOutboundMessageProcessor cxfOutboundMessageProcessor = cxfBuilder.build();
// We need this interceptor so that an exception is thrown when the response contains a SOAPFault.
cxfOutboundMessageProcessor.getClient().getInInterceptors().add(new CheckFaultInterceptor());
// CXF Interceptors that will ensure the SOAP body payload carries every namespace declaration from the
// parent elements
cxfOutboundMessageProcessor.getClient().getInInterceptors().add(new NamespaceSaverStaxInterceptor());
cxfOutboundMessageProcessor.getClient().getInInterceptors().add(new NamespaceRestorerStaxInterceptor());
if (soapAction != null)
{
cxfOutboundMessageProcessor.getClient().getOutInterceptors().add(new SoapActionInterceptor(soapAction));
}
cxfOutboundMessageProcessor.getClient().getOutInterceptors().add(new InputSoapHeadersInterceptor(muleContext));
cxfOutboundMessageProcessor.getClient().getInInterceptors().add(new OutputSoapHeadersInterceptor(muleContext));
return cxfOutboundMessageProcessor;
}