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:
committed by
Stephane Nicoll
parent
32102c693b
commit
bb72a4abe1
@@ -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"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user