<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

    <bean id="handlerAdapter" class="org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter">
        <description>
            The handlerAdapter makes sure that Spring's DispatcherServlet
            supports MessageEndpoints instances as handlers.
        </description>
        <property name="messageFactory" ref="messageFactory"/>
    </bean>

    <bean id="wsdlDefinitionHandlerAdapter" class="org.springframework.ws.transport.http.WsdlDefinitionHandlerAdapter">
        <description>
            This handler adapter adds support for WsdlDefinitions to Spring's DispatcherServlet. It transforms location
            attributes in the original WSDL to reflect the URL of the incoming HTTP request.
        </description>
        <property name="transformLocations" value="true"/>
    </bean>

    <bean id="handlerMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
        <description>
            All incoming request are mapped to the messageDispatcher defined in applicationContext-ws.xml
        </description>
        <property name="defaultHandler" ref="messageDispatcher"/>
        <property name="mappings">
            <props>
                <prop key="SpringWSTest.wsdl">springWSTestWsdl</prop>
            </props>
        </property>
    </bean>

</beans>