Announcement Announcement Module
Collapse
No announcement yet.
ClientInterceptors execution order Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • ClientInterceptors execution order

    From various tests on version 1.5.1 it seems that the order of execution of handleResponse() method of ClientInterceptors is the inverse of interceptors declaration es:
    Code:
    	<bean id="MyGateway"
    		class="it.almaviva.springws.client.MyGateway">
    		<constructor-arg ref="messageFactory" />
    		<property name="interceptors">
    			<list>
    				<ref bean="AResponseInterceptor" />
    				<ref bean="BResponseInterceptor" />
    			</list>
    		</property>
    BResponseInterceptor.handleResponse() is called before AResponseInterceptor.handleResponse().

    It seems not clear from documentation, but is it the expected behaviour?

  • #2
    Client Interceptors Behavior

    Yes, this is the intended behavior

    If you look at the code of the WebServiceTemplate class, you will realize that the iteration on the interceptors is reversed during response.

    Comment

    Working...
    X