// Path: src/main/java/br/fatea/simplebank/interceptors/SOAPValidationInterceptor.java
// public class SOAPValidationInterceptor extends PayloadValidatingInterceptor {
// 	protected Source getValidationRequestSource(WebServiceMessage request) {
// 		Source source = request.getPayloadSource();
// 		validateSchema(source);
// 		return source;
// 	}
// 
// 	private void validateSchema(Source source) {
// 		SchemaFactory schemaFactory = SchemaFactory.newInstance(getSchemaLanguage());
// 		try {
// 			Schema schema = schemaFactory.newSchema(getSchemas()[0].getFile());
// 			Validator validator = schema.newValidator();
// 			DOMResult result = new DOMResult();
// 			try {
// 				validator.validate(source, result);
// 			} catch (SAXException ex) {
// 				logger.error(ex);
// 				throw new InvalidClientArgumentsException(ex.getMessage());
// 			}
// 		} catch (SAXException | IOException ex) {
// 			logger.error(ex);
// 		}
// 	}
// }


import java.util.List;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;
import org.springframework.ws.config.annotation.EnableWs;
import org.springframework.ws.config.annotation.WsConfigurerAdapter;
import org.springframework.ws.server.EndpointInterceptor;
import org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition;
import org.springframework.xml.xsd.SimpleXsdSchema;
import org.springframework.xml.xsd.XsdSchema;
import br.fatea.simplebank.interceptors.SOAPValidationInterceptor;
package br.fatea.simplebank.config;




@EnableWs
@Configuration
public class WebServiceConfig extends WsConfigurerAdapter {
	
	@Override
	public void addInterceptors(List<EndpointInterceptor> interceptors) {
		super.addInterceptors(interceptors);
		interceptors.add(soapValidationInterceptor());
	}

	@Bean
// Path: src/main/java/br/fatea/simplebank/interceptors/SOAPValidationInterceptor.java
// public class SOAPValidationInterceptor extends PayloadValidatingInterceptor {
// 	protected Source getValidationRequestSource(WebServiceMessage request) {
// 		Source source = request.getPayloadSource();
// 		validateSchema(source);
// 		return source;
// 	}
// 
// 	private void validateSchema(Source source) {
// 		SchemaFactory schemaFactory = SchemaFactory.newInstance(getSchemaLanguage());
// 		try {
// 			Schema schema = schemaFactory.newSchema(getSchemas()[0].getFile());
// 			Validator validator = schema.newValidator();
// 			DOMResult result = new DOMResult();
// 			try {
// 				validator.validate(source, result);
// 			} catch (SAXException ex) {
// 				logger.error(ex);
// 				throw new InvalidClientArgumentsException(ex.getMessage());
// 			}
// 		} catch (SAXException | IOException ex) {
// 			logger.error(ex);
// 		}
// 	}
// }


// Path: src/main/java/br/fatea/simplebank/config/WebServiceConfig.java
import java.util.List;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;
import org.springframework.ws.config.annotation.EnableWs;
import org.springframework.ws.config.annotation.WsConfigurerAdapter;
import org.springframework.ws.server.EndpointInterceptor;
import org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition;
import org.springframework.xml.xsd.SimpleXsdSchema;
import org.springframework.xml.xsd.XsdSchema;
import br.fatea.simplebank.interceptors.SOAPValidationInterceptor;

package br.fatea.simplebank.config;




@EnableWs
@Configuration
public class WebServiceConfig extends WsConfigurerAdapter {
	
	@Override
	public void addInterceptors(List<EndpointInterceptor> interceptors) {
		super.addInterceptors(interceptors);
		interceptors.add(soapValidationInterceptor());
	}

	@Bean
	public SOAPValidationInterceptor soapValidationInterceptor() {