title: Spring 4 + Spring-boot + Web Service soap EndpointNotFound or NoSuchMethodError
body: <p>I learn create Web Service  soap from <a href="http://spring.io/guides/gs/producing-web-service/" rel="nofollow">guide Producing a SOAP web service</a>
  When I have jar file and run main method everything is ok. I change to war file run by mvn spring-boot:run is the same.
  But next i have a problem and I wont resolve it without use xml configuration (if I can) only annotation or java code</p>
  
  <p>I found many similar issue but none was help 
  e.g</p>
  
  <pre><code>https://stackoverflow.com/questions/21115205/spring-boot-with-spring-ws-soap-endpoint-not-accessable
  
  http://stackoverflow.com/questions/26873168/spring-boot-webservice-from-wsdl-not-working
  </code></pre>
  
  <p>Deploy war on wildFly 8.2 after that show wsdl but nothing else.
  I change </p>
  
  <pre><code>@ComponentScan
  @EnableAutoConfiguration
  public class Application {
  
      public static void main(String[] args) {
          SpringApplication.run(Application.class, args);
      }
  }
  </code></pre>
  
  <p>to </p>
  
  <pre><code>@Configuration
  @EnableAutoConfiguration
  @ComponentScan
  public class Application extends SpringBootServletInitializer  {
      @Override
      protected SpringApplicationBuilder configure(
              SpringApplicationBuilder application) {
          return application.sources(WebServiceConfig.class);
      }
  }
  </code></pre>
  
  <p>and deploy in wildFly 8.2 after that show wsdl but when put request in SoapUI</p>
  
  <pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                    xmlns:gs="http://spring.io/guides/gs-producing-web-service"&gt;
     &lt;soapenv:Header/&gt;
       &lt;soapenv:Body&gt;
           &lt;gs:getCountryRequest&gt;
               &lt;gs:name&gt;Spain&lt;/gs:name&gt;
           &lt;/gs:getCountryRequest&gt;
     &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>get </p>
  
  <pre><code>WARN  [org.springframework.ws.server.EndpointNotFound] (default task-7) No endpoint mapping found `for [SaajSoapMessage {http://spring.io/guides/gs-producing-web-service}getCountryRequest]`
  </code></pre>
  
  <p>and clear page in soapUI</p>
  
  <p>I search similar issue e.g <a href="https://stackoverflow.com/questions/21115205/spring-boot-with-spring-ws-soap-endpoint-not-accessable">Endpoint not accessable</a></p>
  
  <p>changed</p>
  
  <pre><code>@Bean
  public ServletRegistrationBean dispatcherServlet(
          ApplicationContext applicationContext) {
      MessageDispatcherServlet servlet = new MessageDispatcherServlet();
      servlet.setApplicationContext(applicationContext);
      servlet.setTransformWsdlLocations(true);
      return new ServletRegistrationBean(servlet, "/ws/*");
  }
  </code></pre>
  
  <p>to </p>
  
  <pre><code>@Bean
       public MessageDispatcherServlet dispatcherServlet() {
       return new MessageDispatcherServlet();
       }
  </code></pre>
  
  <p>is the same, but when I use </p>
  
  <pre><code>@Bean
       public MessageDispatcherServlet dispatcherServlet() {
       return new MessageDispatcherServlet(getContext());
       }
  
  
       private WebApplicationContext getContext() {
       AnnotationConfigWebApplicationContext context = new
       AnnotationConfigWebApplicationContext();
       context.setConfigLocation(Application.class.getName());
       return context;
       }
  </code></pre>
  
  <p>get </p>
  
  <pre><code>Caused by: java.lang.NoSuchMethodError: org.springframework.http.converter.json.Jackson2ObjectMapperBuilder.applicationContext(Lorg/springframework/context/ApplicationContext;)Lorg/springframework/http/converter/json/Jackson2ObjectMapperBuilder;
  </code></pre>
  
  <p><a href="http://www.speedyshare.com/PH3UD/errorLog.txt" rel="nofollow">whole error log</a> and <a href="http://www.speedyshare.com/7bNRk/JarTest.zip" rel="nofollow">whole eclipse project</a></p>