I know I can add handlers(JAX WS) to an SEI using @HandlerChain I know I can add interceptors(Apache CXF) to an SEI like this - http://web-gmazza.rhcloud.com/blog/entry/jaxwshandlers-to-cxfinterceptors
I know I can add handlers to the Provider Interface using @HandlerChain- https://docs.oracle.com/middleware/1213/wls/WSGET/jax-ws-soaphandlers.htm#WSGET3461
Question is : Can I, and if so How,(the same way as SEI?) add Interceptors to the Provider interface?
Well, I figured out the answer to this specific question. You can add interceptors like this
ProviderImpl implementor = new ProviderImpl();
JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean();
svrFactory.setAddress("http://localhost:9000/providerexample");
svrFactory.setServiceBean(implementor);
svrFactory.getInInterceptors().add(new LoggingInInterceptor());
svrFactory.getOutInterceptors().add(new LoggingOutInterceptor());
svrFactory.create();
But now the next problem : interceptors deal with SoapMessage(Apache CXF). Provider deals with SOAPMessage(JAXWS). So I can get the interceptors to log and all, but when I try to manipulate the SoapMessage, I have troubles. Still not sure if the reason is the incompatibility of these two classes( or whether the framework takes care of the interconversion) or the specific code I'm using there.
EDIT: There is no problem with the Interceptors, it was just some stupid errors I made.