Add support for Spring WS auto WSDL/XSD exposure

This commit adds support for auto-configuration of Spring WS automatic
WSDL and XSD exposure i.e. registration of `WsdlDefinition` and
`XsdDefinition` beans. The bean registration is triggered by configuring
`spring.webservices.wsdl-locations` property which will search the
provided locations for WSDL/XSD files and register appropriate beans.

See gh-9635
This commit is contained in:
Vedran Pavic
2017-06-29 13:36:14 +02:00
committed by Stephane Nicoll
parent 32102c693b
commit bb72a4abe1
9 changed files with 164 additions and 7 deletions

View File

@@ -18,10 +18,8 @@ package sample.webservices;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;
import org.springframework.ws.config.annotation.WsConfigurerAdapter;
import org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition;
import org.springframework.xml.xsd.SimpleXsdSchema;
import org.springframework.xml.xsd.XsdSchema;
@Configuration
@@ -37,9 +35,4 @@ public class WebServiceConfig extends WsConfigurerAdapter {
return wsdl;
}
@Bean
public XsdSchema countriesSchema() {
return new SimpleXsdSchema(new ClassPathResource("META-INF/schemas/hr.xsd"));
}
}