title: Spring-ws on Weblogic: MessageDispatcherServlet doesn't have a default constructor
body: <p>I'm trying to deploy a war containing spring webservices. But I am getting a weird error like this:</p>
  
  <pre><code>following error weblogic.application.ModuleException: [HTTP:101216]Servlet: "spring-ws" failed to preload on startup in Web application: "myApp-1.0.0-SNAPSHOT.war".
  javax.servlet.ServletException: Servlet class: 'org.springframework.ws.transport.http.MessageDispatcherServlet' doesn't have a default constructor
      at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:261)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
      at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
      at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
      at weblogic.servlet.internal.StubLifecycleHelper.&lt;init&gt;(StubLifecycleHelper.java:48)
      at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539)
      at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1976)
      at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1950)
  </code></pre>
  
  <p>I've tried giving a default constructor in the endpoint class. </p>
  
  <p>Below are the steps which I followed:</p>
  
  <ol>
  <li><p><code>web.xml</code> has this entry:</p>
  
  <pre><code>&lt;servlet&gt;
      &lt;servlet-name&gt;spring-ws&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.springframework.ws.transport.http.MessageDispatcherServlet&lt;/servlet-class&gt;
      &lt;init-param&gt;
          &lt;param-name&gt;transformWsdlLocations&lt;/param-name&gt;
          &lt;param-value&gt;true&lt;/param-value&gt;
      &lt;/init-param&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;spring-ws&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre></li>
  <li><p>web-inf folder has <code>spring-ws-servlet.xml</code> file which has the entries for component scan, enabling the annotations and the wsdl entry like this:</p>
  
  <pre><code>&lt;sws:static-wsdl id="MyService" 
       location="classpath:/services/myService/1.0/MyService.wsdl" /&gt;
  </code></pre></li>
  </ol>
  
  <p>Please let me know if I'm missing anything here....</p>
  
  <p>Thank you.</p>