<?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:context="http://www.springframework.org/schema/context"
		xmlns:tx="http://www.springframework.org/schema/tx"
		xmlns:jee="http://www.springframework.org/schema/jee"
		xmlns:jaxws="http://cxf.apache.org/jaxws"
		xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
				http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
				http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd 
				http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd
				http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd" >

	<!-- ========================= DAO DEFINITIONS: IBATIS IMPLEMENTATIONS ========================= -->

	<bean id="asteDao"
		class="it.maggioli.eldasoft.sil.aste.db.dao.ibatis.SqlMapAsteDao">
		<property name="dataSource" ref="dataSource" />
		<property name="sqlMapClient" ref="sqlMapClient" />
		<property name="dbms">
			<bean factory-bean="dbmsSpecs" factory-method="getInternalDbmsCode" />
		</property>
	</bean>

	<!-- ========================= BEAN DEFINITIONS ========================= -->	
	<bean id="asteManager" parent="defaultTransactionProxy">
		<property name="target">
			<bean class="it.maggioli.eldasoft.sil.aste.bl.AsteManager">
				<property name="asteDao" ref="asteDao" />
				<property name="genChiaviManager" ref="genChiaviManager" />
				<property name="datiCodificatiManager" ref="datiCodificatiManager" />
			</bean>
		</property>
	</bean>
	
 	<!-- implementazione del web service WSAste -->
	<bean id="WSAste"
		class="it.maggioli.eldasoft.sil.aste.ws.WSAsteSoapImpl">		
		<property name="asteManager" ref="asteManager" />		
	</bean>
	
	<!-- ========================= WEB SERVICE DEFINITIONS ========================= -->

	<!-- ATTENZIONE: il wizard per la generazione bottom-up genera un <jaxws:endpoint ...>
		con il parametro xmlns:tns="http://www.eldasoft.it/WSAste/"
		non corretto. E' necessario quindi sostituire il valore dal POM.XML
		altrimenti la webapp va in errore all'avvio.		
		implementor="#WSGareAppalto" indica quale bean è collegato allo
		endpoint del servizio.
		NB: per eseguire il servizio senza WSDL è necessario omettere il 
		    parametro wsdlLocation qui e nell'annotazione dell'implementazione
		    del servizio.		
	-->	
	<jaxws:endpoint xmlns:tns="http://www.eldasoft.it/sil/WSAste/"
		id="wsastesoap" 
		implementor="#WSAste"
		endpointName="tns:WSAsteSOAP"
		serviceName="tns:WSAsteSoap"
		address="/WSAsteSOAP">
		<jaxws:features>
<!-- 			Enable/Disable message payload logging -->
<!-- 			 <bean class="org.apache.cxf.feature.LoggingFeature" />   -->
		</jaxws:features>
	</jaxws:endpoint>
		
</beans>