[jboss-as7-dev] Does work @WebService with @Interceptor on AS 7.1.1.Final ?

Marcelo Zabalet zabalet at gmail.com
Wed Jun 27 16:42:33 EDT 2012


I'm trying to use interceptors in conjuntion with webservices on AS
7.1.1.Final as the example shows below. The interceptor intercepts well
until it is combined with @WebService. Is this supposed to work? Am I
missing something?

----Binding---
@InterceptorBinding
@Target({METHOD, TYPE})
@Retention(RUNTIME)
@Inherited
public @interface SomeInterceptorBinding { }

---Interceptor---
@SomeInterceptorBinding
@Interceptor
public class SomeInterceptor {
  @AroundInvoke
    public Object handle(InvocationContext ctx) throws Exception {
        return ctx.proceed();
    }
}

---WebService---
@SomeInterceptorBinding
@WebService
public class AWebService {
  @WebMethod
  public void someMethod() {
    ...
  }
}

---beans.xml---
<?xml version="1.0" encoding="UTF-8"?>
<beans ...>
  <interceptors>
    <class>com.xyz.SomeInterceptor</class>
  </interceptors>
</beans>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-as7-dev/attachments/20120627/c2592dc0/attachment.html 


More information about the jboss-as7-dev mailing list