title: Custom spring interceptor
body: <p>I want to convert some of our internal API into a <strike>spring bean</strike> spring interceptor that we can use in other projects. This API needs some instantiation and other logic which I want to encapsulate in this <strike>bean</strike> so that we can just put the bean into our app context with necessary propoerties alone, and this will then apply the logic.</p>
  
  <p>I remember having read an article on this somewhere in the past - but cant find it now.
  Any pointers to something similar will be helpful</p>
  
  <p>EDIT: Sorry, I meant a spring interceptor, not a bean - my bad - please see my edit. I want to apply this interceptor to another bean dealing in XML messages.</p>
  
  <p>EDIT 2: ANSWER FOUND
  found it!</p>
  
  <p>I found the answer to this - we were looking to insert the interceptor at the point where we were calling our webservice. So I looked at the interceptor package in spring-ws and found this end point interceptor interface. We will now implement this interceptor and put our processing logic in the appropriate handle*() method.</p>
  
  <p><a href="http://static.springsource.org/spring-ws/sites/1.5/apidocs/org/springframework/ws/server/EndpointInterceptor.html" rel="nofollow noreferrer">http://static.springsource.org/spring-ws/sites/1.5/apidocs/org/springframework/ws/server/EndpointInterceptor.html</a></p>