Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-832

Add support for programmatically instantiating MessageDispatcherServlet

    Details

      Description

      The current MessageDispatcherServlet does not support a pure code configuration (no web.xml) as it does not offering a way of passing the 'root' Spring application context when the dispatcher servlet is created. For the normal Spring MVC DispatcherServlet there is a constructor with a WebApplicationContext parameter (added in 3.1.x I believe) and the 'root' app context can be passed on using this parameter.

      Additionally there code be some review of the current schema namespaces to see if they are appliable as annotation classes. All of this would need the samples, documentation to be updated.

      Below is a way to get the core javaconfig to work with the existing springws release (but still need the web.xml)

      <servlet>
      	<servlet-name>spring-ws</servlet-name>
      	<servlet-class&gt;org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class&gt;
      		<init-param>
      			<param-name>transformWsdlLocations</param-name>
      			<param-value>true</param-value>
      		</init-param>
      		<init-param>
      			<param-name>contextClass</param-name>
      			<param-value>
      				org.springframework.web.context.support.AnnotationConfigWebApplicationContext
      			</param-value>
      		</init-param>
      		<init-param>
      			<param-name>contextConfigLocation</param-name>
      			<param-value>org.springframework.ws.samples.echo.code_approach.SpringWSConfig</param-value>
      		</init-param>
      </servlet>
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                arjen.poutsma Arjen Poutsma
                Reporter:
                mdiskin Mark Diskin
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: