Skip to end of metadata
Go to start of metadata

The following is a quick guide to adding interceptors to endpoint classes.

Step 1: Extract your endpoint interfaces

In order to add an AOP interceptor for the methods on your endpoint classes, you must separate your endpoint interfaces from the endpoint implementation classes:

Step 2: Create your interceptor

Your interceptor must implement either org.aopalliance.aop.Advice or org.springframework.aop.Advisor. For more information about spring-supported AOP, see the spring documentation. For this example, we'll be creating a standard org.aopalliance.intercept.MethodInterceptor:

Step 3: Declare your interceptor in the enunciate.xml configuration file

You'll need to declare your own custom spring beans in a separate file that will be imported:

Notes

  • If you need more custom configuration of your interceptor, create a separate spring beans configuration file and import it with the "springImport" element in the "spring-app" module.
  • If your interceptor class implements org.codehaus.enunciate.modules.xfire.EnunciateServiceAdvice or org.codehaus.enunciate.modules.xfire.EnunciateServiceAdvisor, you don't need to declare it as a globalServiceInterceptor in the enunciate configuration file.
Labels
  • None