Je souhaite utiliser SpringSecurity pour une appli Java/Flex (java côté serveur, flex côté client).

Mais j'ai apparemment un problème pour la définition d'un "remote-service" flex, il me dit qu'il a déjà été défini :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
Caused by: flex.messaging.config.ConfigurationException: Cannot add destination with id 'fakeService' to service with id 'remoting-service' because another service with id 'remoting-service' already has a destination with the same id.
Voici mon web-application-config.xml (xml de spring) :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:flex="http://www.springframework.org/schema/flex"
      xmlns:security="http://www.springframework.org/schema/security"
      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/flex
            http://www.springframework.org/schema/flex/spring-flex-1.0.xsd
            http://www.springframework.org/schema/security
            http://www.springframework.org/schema/security/spring-security-2.0.4.xsd">
 
    <flex:message-broker>
        <flex:secured />
    </flex:message-broker>
 
    <!-- A secured version of fakeService -->
    <bean id="fakeService" class="FakeService" >
        <flex:remote-service />
        <security:intercept-methods>
            <security:protect method="*" access="ROLE_USER" />
    	</security:intercept-methods>
    </bean>
 
    <!-- Expose the FakeService bean for BlazeDS remoting -->
    <flex:remote-service ref="fakeService" />
 
</beans>
Et voici mon remoting-config.xml :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
<?xml version="1.0" encoding="UTF-8"?>
<service id="remoting-service" 
    class="flex.messaging.services.RemotingService">
 
    <adapters>
        <adapter-definition id="java-object" class="flex.messaging.services.remoting.adapters.JavaAdapter" default="true"/>
    </adapters>
 
    <default-channels>
        <channel ref="my-amf"/>
    </default-channels>
 
</service>
Si je supprime cette ligne :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
<flex:remote-service ref="fakeService" />
Plus de problème de déploiement, mais évidemment, le service n'existe plus, on ne peut plus y accéder côté flex.

Merci de votre aide