<?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="messagingReceiver" class="org.springframework.ws.transport.tcp.TcpMessageReceiver">
        <property name="messageFactory" ref="messageFactory"/>
        <property name="messageReceiver">
            <bean class="org.springframework.ws.transport.SimpleTestingMessageReceiver"/>
        </property>
    </bean>

    <bean id="tcpSender" class="org.springframework.ws.transport.tcp.TcpMessageSender" />

    <bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory"/>

    <!-- define an MBeanExporter -->
    <bean id="mbeanExporter" class="org.springframework.jmx.export.MBeanExporter">
        <!-- the beans to be exported to JMX -->
        <property name="beans">
            <map>
                <entry key="spring-ws:service=messagingContainer">
                    <ref local="messagingReceiver"/>
                </entry>
            </map>
        </property>
        <property name="assembler">
            <bean class="org.springframework.jmx.export.assembler.InterfaceBasedMBeanInfoAssembler">
                <property name="interfaceMappings">
                    <props>
                        <prop key="spring-ws:service=messagingContainer">org.springframework.context.Lifecycle</prop>
                    </props>
                </property>
            </bean>
        </property>
    </bean>


</beans>
