}
@Test
public void testXsdSchema() throws Exception {
PayloadValidatingInterceptor interceptor = new PayloadValidatingInterceptor();
SimpleXsdSchema schema = new SimpleXsdSchema(new ClassPathResource(SCHEMA, getClass()));
schema.afterPropertiesSet();
interceptor.setXsdSchema(schema);
interceptor.setValidateRequest(true);
interceptor.setValidateResponse(true);
interceptor.afterPropertiesSet();
MockWebServiceMessage request = new MockWebServiceMessage();
request.setPayload(new ClassPathResource(VALID_MESSAGE, getClass()));
context = new DefaultMessageContext(request, new MockWebServiceMessageFactory());
boolean result = interceptor.handleRequest(context, null);
Assert.assertTrue("Invalid response from interceptor", result);
Assert.assertFalse("Response set", context.hasResponse());
}