4 Replies Latest reply on Sep 4, 2017 6:39 AM by Ulab S

    cxf InInterceptors annotation not working

    Francisco Antunes Newbie

      Hello guys so I have all the code built with no errors but my Interceptor is not firing for some reason.. Can you help ?

      My Service is coded like this :

      @org.apache.cxf.interceptor.InInterceptors(interceptors={"package.WSSecurityInterceptor"}) @WebService(name = "SERVICE", targetNamespace = "urn:some.namespace", serviceName = "SERVICE") @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED, use = SOAPBinding.Use.LITERAL) public class SampleService{ /* Do things Web Services like to do */ }

      My Interceptor is coded like this:

      public class WSSecurityInterceptor extends AbstractSoapInterceptor {  private String userName; private String password;  public WSSecurityInterceptor() { super(Phase.PRE_PROTOCOL); }  public void handleMessage(SoapMessage message) throws Fault {  System.out.println("WSSecurityInterceptor handleMessage invoked"); }

      What am I missing ? I added the to my jboss structure and on Maven I am calling dependencies on cxf 2.6.1. I can not see what I am missing. Hope you guys can help