I am trying to develop a Spring webservice and followed this tutorial https://spring.io/guides/gs/producing-web-service/
The project structure(and the configuration class names) are same as mentioned in the tutorial. I am trying to do all possible configuration using annotation and want to avoid all xml based configuration. So far I even avoided applicationContext.xml and web.xml by using java configuration. However, now I want to introduce XSD validation as shown in this tutorial: http://stack-over-flow.blogspot.com/2012/03/spring-ws-schema-validation-using.html i.e. by extending the PayloadValidatingInterceptor class.As shown in the tutorial, this custom validator interceptor then needs to be registered using the following xml configuration:
<bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping">
<property name="interceptors">
<list>
<ref bean="validatingInterceptor"/>
</list>
</property>
</bean>
<bean id="validatingInterceptor" class="com.test.ValidationInterceptor ">
<property name="schema" value="/jaxb/test.xsd"/>
</bean>
However, I am not sue how to do the above configuration using annotation. i.e. setting the XSD file to the interceptor. I have tried overriding the "addInterceptor" of the WsConfigurerAdaptor class to register the interceptor. Please let me know if I need to do that or what is the correct way of doing the entire thing using annotations.