<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:jms="http://www.springframework.org/schema/jms"
       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.5.xsd
       http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms-2.5.xsd">

    <!-- ===================== JMS TRANSPORT  ===================================== -->

    <bean id="broker" class="org.apache.activemq.broker.BrokerFactory" factory-method="createBroker"
          init-method="start">
        <constructor-arg value="broker:tcp://localhost:61616?persistent=false"/>
    </bean>

    <bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
        <property name="brokerURL" value="tcp://localhost:61616"/>
    </bean>

    <jms:listener-container connection-factory="connectionFactory">
        <jms:listener destination="RequestQueue" ref="messageListener"/>
    </jms:listener-container>

    <bean id="messageListener" class="org.springframework.ws.transport.jms.WebServiceMessageListener">
        <property name="messageFactory" ref="messageFactory"/>
        <property name="messageReceiver" ref="messageReceiver"/>
    </bean>

</beans>