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>