Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: CAMEL-3472 add example of Spring Web Services component

...

Code Block
XML
XML
<bean id="endpointMapping" class="org.apache.camel.component.spring.ws.bean.CamelEndpointMapping">
	<property name="interceptors">
		<list>
			<ref local="validatingInterceptor" />
			<ref local="loggingInterceptor" />
		</list>
	</property>
</bean>

This The endpointMapping bean is a Spring-WS endpoint mapping that maps incoming messages to the appropriate Camel routes. You'll only need to define a single CamelEndpointMapping, regardless of the number of Camel routes implementing using Spring-WS endpoints.

The above endpoint mapping endpointMapping bean is automatically picked up by the MessageDispatcherServlet declared in web.xml:

Code Block
XML
XML
<servlet>
	<servlet-name>spring-ws</servlet-name>
	<servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class>
</servlet>
Since the servlet is named {{spring-ws}} it will look for a file named {{/WEB-INF/spring-ws-servlet.xml}}.