title: Spring Boot wsdl first - change url to wsdl
body: <p>I'm using Spring Boot 1.3.* to build a contract first web service. I looked at the answer for the question at <a href="https://stackoverflow.com/questions/33773346/how-to-use-wsdl-with-spring-boot">How to use WSDL with spring-boot?</a> . This worked fine</p>
  
  <pre><code>@EnableWs
  @Configuration
  public class WebServiceConfig extends WsConfigurerAdapter {
  @Bean
  public ServletRegistrationBean messageDispatcherServlet(ApplicationContext applicationContext) {
      MessageDispatcherServlet servlet = new MessageDispatcherServlet();
      servlet.setApplicationContext(applicationContext);
      servlet.setTransformWsdlLocations(true);
      return new ServletRegistrationBean(servlet, "/ws/*");
  }
  
  //http://localhost:8080/ws/services.wsdl --bean name is set to 'services'
  @Bean(name = "services")
  public Wsdl11Definition defaultWsdl11Definition() {
      SimpleWsdl11Definition wsdl11Definition = new SimpleWsdl11Definition();
      wsdl11Definition.setWsdl(new ClassPathResource("/schema/MyWsdl.wsdl")); //your wsdl location
      return wsdl11Definition;
  }
  }
  </code></pre>
  
  <p>My wsdl is now located at <a href="http://localhost:8080/ws/services.wsdl" rel="nofollow noreferrer">http://localhost:8080/ws/services.wsdl</a> . Problem is that the application that will be the consumer of this web service requires the wsdl url to be written as</p>
  
  <pre><code>http://localhost:8080/ws/services?wsdl
  </code></pre>
  
  <p>How can i achieve this?</p>