Skip to content

Add support for programmatically instantiating MessageDispatcherServlet [SWS-832] #906

@gregturn

Description

@gregturn

Mark Diskin opened SWS-832 and commented

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>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class>
		<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>

Affects: 2.1.3

Reference URL: http://forum.springsource.org/showthread.php?136478-Spring-3-2-Java-Config-Example&p=443683#post443683

Issue Links:

Referenced from: commits 7d97453, 6576999

1 votes, 4 watchers

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions