<?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:ws="http://jax-ws.dev.java.net/spring/core"
  xmlns:wss="http://jax-ws.dev.java.net/spring/servlet"
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
    http://jax-ws.dev.java.net/spring/core    http://jax-ws.dev.java.net/spring/core.xsd
    http://jax-ws.dev.java.net/spring/servlet    http://jax-ws.dev.java.net/spring/servlet.xsd">
  <!--
	http://forums.java.net/jive/thread.jspa?threadID=22289	https://jax-ws-commons.dev.java.net/issues/
	http://static.springframework.org/spring/docs/2.0.x/reference/beans.html#beans-factory-lifecycle
  -->
    <bean id="creerDossierService" class="coop.libriciel.service.CreerDossierService" init-method="init"/>
    <bean id="wsService" class="coop.libriciel.service.WsService"/>
    <bean id="signatureService" class="coop.libriciel.signature.service.SignatureService"/>
    <bean id="pdfStampPositionService" class="coop.libriciel.crypto.service.PdfStampPositionService" init-method="init"/>

<!--    <bean id="cmsSignatureHandler" class="coop.libriciel.crypto.service.signature.CMSSignatureHandler"/>-->
<!--    <bean id="padesSignatureHandler" class="coop.libriciel.crypto.service.signature.PadesSignatureHandler"/>-->
<!--    <bean id="lockedPadesSignatureHandler" class="coop.libriciel.crypto.service.signature.LockedPadesSignatureHandler"/>-->
<!--    <bean id="xadesSignatureHandler" class="coop.libriciel.crypto.service.signature.XadesSignatureHandler"/>-->

    <bean id="pesv2SignatureHandler" class="coop.libriciel.crypto.service.signature.PESv2SignatureHandler"/>
    <bean id="ebicsSignatureHandler" class="coop.libriciel.crypto.service.signature.EbicsSignatureHandler"/>

    <bean id="padesSignatureHandlerv3" class="coop.libriciel.crypto.service.signature.PadesSignatureHandlerV3"/>
    <bean id="lockedPadesSignatureHandlerv3" class="coop.libriciel.crypto.service.signature.LockedPadesSignatureHandlerV3"/>
    <bean id="cmsSignatureHandlerv3" class="coop.libriciel.crypto.service.signature.CMSSignatureHandlerV3"/>
    <bean id="xadesSignatureHandlerv3" class="coop.libriciel.crypto.service.signature.XadesSignatureHandlerV3"/>

    <bean id="signatureHandlerProvider" class="coop.libriciel.crypto.service.SignatureHandlerProvider" init-method="init"/>
    <bean id="pesViewerInitService" class="coop.libriciel.pesviewer.PesViewerInitService" init-method="init"/>

    <bean id="deskUtilsService" class="coop.libriciel.service.DeskUtilsService"/>
    <bean id="folderUtilsService" class="coop.libriciel.service.FolderUtilsService"/>
    <bean id="nodeUtilsService" class="coop.libriciel.service.NodeUtilsService"/>
    <bean id="userUtilsService" class="coop.libriciel.service.UserUtilsService"/>

   <!-- this bean implements web service methods -->
  <bean id="interfaceParapheur" class="org.adullact.spring_ws.iparapheur._1.InterfaceParapheurEndPointMtom">
        <property name="nodeService">            
		<ref bean="nodeService" />        
	</property>
        <property name="authenticationComponent">            
		<ref bean="authenticationComponent" />        
	</property>
        <property name="transactionService">            
		<ref bean="transactionService" />        
	</property>
        <property name="parapheurService">
		<ref bean="parapheurService" />
        </property>
        <property name="s2lowService">
		<ref bean="s2lowService" />
        </property>
        <property name="serviceRegistry">
		<ref bean="ServiceRegistry" />
        </property>
      <property name="messagesSender">
          <ref bean="messagesSender" />
      </property>
  </bean>
  <!--ws:service id="interfaceParapheurService" bindingID="http://www.w3.org/2003/05/soap/bindings/HTTP/" bean="#InterfaceParapheur" /-->
  <ws:service   id="InterfaceParapheurService"  bean="#interfaceParapheur" />
  <wss:binding url="/ws-iparapheur" service="#InterfaceParapheurService" />
  <!--wss:binding id="InterfaceParapheurBinding" url="/ws-iparapheur" service="#InterfaceParapheurService" /-->

  <!-- this bean implements web service methods without MTOM -->
  <bean id="interfaceParapheurNoMTOM" class="org.adullact.spring_ws.iparapheur._1.InterfaceParapheurEndPointNoMTOM">
        <property name="nodeService">
                <ref bean="nodeService" />
        </property>
        <property name="authenticationComponent">
                <ref bean="authenticationComponent" />
        </property>
        <property name="transactionService">
                <ref bean="transactionService" />
        </property>
        <property name="parapheurService">
                <ref bean="parapheurService" />
        </property>
        <property name="s2lowService">
                <ref bean="s2lowService" />
        </property>
        <property name="serviceRegistry">
                <ref bean="ServiceRegistry" />
        </property>
      <property name="messagesSender">
          <ref bean="messagesSender" />
      </property>
  </bean>
  <ws:service   id="InterfaceParapheurServiceNoMTOM"  bean="#interfaceParapheurNoMTOM" />
  <wss:binding url="/ws-iparapheur-no-mtom" service="#InterfaceParapheurServiceNoMTOM" />

  <!--wss:bindings id="jax-ws.http">
  <wss:bindings>
  <wss:binding url="/ws-iparapheur">
    <wss:service>
	<ws:service bean="#InterfaceParapheur"
		impl="org.adullact.spring_ws.iparapheur._1.InterfaceParapheurImpl" 
		portName="{http://www.adullact.org/spring-ws/iparapheur/1.0}InterfaceParapheurPort"
		serviceName="{http://www.adullact.org/spring-ws/iparapheur/1.0}InterfaceParapheurService">
	  <ws:primaryWsdl>
		<value>/WEB-INF/wsdl/iparapheur.wsdl</value>
	  </ws:primaryWsdl>
	</ws:service>
    </wss:service>
  </wss:binding>
  </wss:bindings>
  </wss:bindings-->

  <!--wss:binding url="/add" service="#addService" /-->
    <!-- simplest definition only needs the class name -->
  <!--ws:service id="addService" impl="foo.MyAddService" handlers="#myHandler"/-->
  <!--bean id="myHandler" class="foo.MyHandler" /-->
</beans>
