Spring Web Services Starter

- upgraded Spring WS to 2.2.0.RELEASE
- replaced default MVC DispatcherServlet with MessageDispatcherServlet
- migrated XML based config with nww Spring WS Java config

Fixes: gh-412
This commit is contained in:
Maciej Walkowiak
2014-06-09 21:17:19 +01:00
committed by Andy Wilkinson
parent e2a449da97
commit 95a6ce9e48
10 changed files with 191 additions and 183 deletions
@@ -2,12 +2,8 @@ package sample.ws;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.context.embedded.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
import org.springframework.ws.transport.http.MessageDispatcherServlet;
/**
* Created by in329dei on 28-2-14.
@@ -15,27 +11,9 @@ import org.springframework.ws.transport.http.MessageDispatcherServlet;
@Configuration
@EnableAutoConfiguration
@ComponentScan
@ImportResource("classpath:/META-INF/spring/spring-ws-context.xml")
public class SampleWsApplication {
public static void main(String[] args) throws Exception {
SpringApplication.run(SampleWsApplication.class, args);
}
@Bean
public ServletRegistrationBean messageDispatcherServletRegistration() {
MessageDispatcherServlet mds = new MessageDispatcherServlet();
mds.setTransformWsdlLocations(true);
ServletRegistrationBean srb = new ServletRegistrationBean(messageDispatcherServlet(), "/services/*");
srb.setLoadOnStartup(1);
return srb;
}
@Bean
public MessageDispatcherServlet messageDispatcherServlet() {
MessageDispatcherServlet mds = new MessageDispatcherServlet();
mds.setTransformWsdlLocations(true);
return mds;
}
public static void main(String[] args) throws Exception {
SpringApplication.run(SampleWsApplication.class, args);
}
}