Information

0
Story Points

Technologies

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

  <bean id="xteeConsumer" class="ee.webmedia.xtee.client.service.StandardXTeeConsumer">
    <property name="webServiceTemplate" ref="webServiceTemplate" />
    <property name="serviceConfiguration" ref="xteeServiceConfiguration" />
  </bean>
  
  <bean id="xteeServiceConfiguration" class="ee.webmedia.xtee.client.service.SimpleXTeeServiceConfiguration">
    <property name="institution" value="${institution}" />
    <property name="idCode" value="${idcode}" />
    <property name="securityServer" value="${security.server}" />
    <property name="database" value="${database}" />
    <property name="version" value="${version}" />
    <property name="method" value="${method}" />
  </bean>
  
  <bean id="xmlBeansMarshaller" class="org.springframework.oxm.xmlbeans.XmlBeansMarshaller" />

  <bean id="webServiceTemplate" class="org.springframework.ws.client.core.WebServiceTemplate">
    <property name="marshaller" ref="xmlBeansMarshaller" />
    <property name="unmarshaller" ref="xmlBeansMarshaller" />
    <property name="interceptors">
      <list>
        <ref bean="wsConsumptionLoggingInterceptor" />
        <ref bean="xteeResponseSanitizer" />
      </list>
    </property>
  </bean>

  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="locations">
      <value>classpath*:xtee.properties</value>
    </property>
  </bean>

  <!-- interceptor that logs web service invocations at 'debug' level -->
  <bean id="wsConsumptionLoggingInterceptor"
    class="ee.webmedia.xtee.client.util.WSConsumptionLoggingInterceptor" />
    
  <!-- interceptor that transforms the tree in way required by X-Tee -->
  <bean id="xteeResponseSanitizer"
    class="ee.webmedia.xtee.client.util.XTeeResponseSanitizerInterceptor" />

</beans>
Page generated: Oct 19, 2017 2:34:25 PM