0 Replies Latest reply on Aug 12, 2014 8:38 AM by aida.sp

    Problems adding interceptors to EJB as WebService (Jboss 5.1.0)

    aida.sp

      Hello,

       

      I'm having trouble in order to add interceptors using the @InInterceptors/@OutInterceptors annotations of CXF.

       

      I'm working with Jboss 5.1.0 GA and CXF 2.7.6.

       

      Researching, I have read that in newer versions of JBoss (as JBoss 7 AS) it is necessary to add a MANIFEST file with the cxf dependency. I understand that this doesn´t apply for my version of jboss (anyway, I have tried it with no results)

       

      I have the following EJB that is published as a WebService:

       

      @InInterceptors(interceptors = {"mypackage.MyInInterceptor"})

      @WebService( name = "HelloWorldService",

                               serviceName = "HelloWorldService",

                               targetNamespace = "http://mydomain/service/samples/")

      @Stateless(name = "HelloWorldService")

      @BindingType(value = SOAPBinding.SOAP12HTTP_BINDING)

      public class HelloWorldServiceImpl {

       

              private static String HELLO_WORLD_MESSAGE = "Hello world {0}";

             

              /**

               * Hello World Operation

               */

              @WebMethod

              public String helloWorld(@WebParam(name = "name") String name){

                     

                      return MessageFormat.format(HELLO_WORLD_MESSAGE, name);

              }

      }

       

      But the Interceptor does not fire. I have checked that the message is not handled (with a breakpoint and debugging, verifying that the message arrives to the process without arriving to the interceptor).

       

      I also tried with CXF interceptors (not a customized one) with no results.

       

      My JBoss has no extras added, and I understand (maybe I'm wrong) that I don´t need to install any cxf stuff, do I?

       

      Thank you in advance, I'm really stuck with this and any help would be appreciated,

       

      KR,

       

       

        Aida.