IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Flex Discussion :

Je n'arrive pas à appeler mes services via une vue Flex 3.0


Sujet :

Flex

  1. #1
    Futur Membre du Club
    Inscrit en
    Avril 2010
    Messages
    11
    Détails du profil
    Informations forums :
    Inscription : Avril 2010
    Messages : 11
    Points : 9
    Points
    9
    Par défaut Je n'arrive pas à appeler mes services via une vue Flex 3.0
    Bonjour,

    Je suis débutante en Flex 3.0, j'ai utilisé une template pour réaliser la maquette de mon projet de fin d'étude. Mais ça fait presque un mois que je suis bloquée dans la partie flex, je n'arrive pas à appeler mes services à partir de mes vues flex.

    Voila ce que j'ai essayé de faire:

    Vue AddCentre: :

    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
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
     
    <?xml version="1.0" encoding="utf-8"?>
     
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" horizontalAlign="center" width="100%" height="100%"  backgroundColor="#000000"
     
         styleName="back" paddingLeft="20" paddingBottom="0" verticalScrollPolicy="off" paddingRight="20" paddingTop="0" viewSourceURL="srcview/index.html">
     
     
    <mx:Script>
     
     
            <![CDATA[
                import mx.rpc.events.FaultEvent;
                import mx.rpc.events.ResultEvent;
     
     
                private function doCall():void{
                    roService.test1();
                }
     
                /**
                 * Méthode invoquée en cas de succès de l'appel RPC 
                 */ 
                private function onResult(event : ResultEvent):void{
                    // Afficher la réponse
                    txtCodeCollaborateur.text = event.result as String;
                }
     
                /**
                 * Méthode invoquée en cas d'échec de l'appel RPC 
                 */ 
                private function onFault(event : FaultEvent):void{
                    // Afficher le message d'erreur
                    txtCodeCollaborateur.text = event.fault.message;
                }
     
            ]]>
     
     
    </mx:Script>
     
                        <mx:RemoteObject id="roService" 
                         destination="serviceDest"
                         result="onResult(event)"
                         fault="onFault(event)"/>
     
     
     
        <mx:Style source="css/classicOrange.css"/>
     
     
     
        <mx:DropShadowFilter blurY="5" blurX="5" angle="90" color="#000000" alpha=".6" id="dropShadowFilter"/>  
     
        <mx:DropShadowFilter blurY="2" blurX="2" angle="45" distance="2" color="#000000" alpha=".8" id="dropShadowFilter2"/>
     
        <mx:GlowFilter blurX="20" id="glowFilter" color="#000000"/>
     
        <mx:VBox backgroundColor="#cccccc" width="1000" height="100%" verticalGap="10" paddingLeft="10" paddingRight="10" filters="{[glowFilter]}" paddingBottom="20" borderSides="['left','right']" borderStyle="inset" borderColor="#808080">
     
            <mx:ApplicationControlBar width="100%" height="50" verticalAlign="middle" filters="{[dropShadowFilter]}" paddingTop="0" paddingLeft="20" paddingRight="20">
     
                <mx:Image source="images/logo.png" height="40"/>
     
                <mx:Spacer width="100%"/>
     
                <mx:HBox verticalAlign="top" height="100%" paddingTop="1" paddingRight="10">
     
                    <mx:LinkBar dataProvider="{pages}"/>
     
                    <mx:ViewStack id="pages" width="1" height="100%">
     
                        <mx:Canvas label="A propos de nous "/>
     
                        <mx:Canvas label="Contact"/>
     
                        <mx:Canvas label="Se déconnecter"/>
     
                    </mx:ViewStack>    
     
                </mx:HBox>
     
                </mx:ApplicationControlBar>    
     
            <mx:MenuBar width="100%" x="0" y="0"  height="20" labelField="@label"/>        
     
            <mx:HBox width="100%" height="100%">
     
     
     
                <mx:Panel width="100%" height="100%" title="Bienvenue" styleName="Panel2" layout="vertical">
     
     
     
                    <mx:Accordion width="100%" height="100%">
     
                        <mx:VBox width="100%" height="100%" label="Ajouter un Centre" horizontalAlign="center"  >
     
                                        <mx:HBox width="100%" paddingLeft="10" paddingRight="10" horizontalAlign="center">
     
                                            <mx:Label width="200" color="#030303" text="Code Centre"/>
                                            <mx:Text width="152" color="#060606" id="txtCodeCollaborateur" fontFamily="Arial" fontSize="12"/>
     
                                            <mx:RadioButtonGroup id="MyG"/>
     
                                        </mx:HBox>                                                
     
     
     
                                        <mx:HBox width="100%" paddingLeft="10" paddingRight="10" horizontalAlign="center">
     
                                            <mx:Label text="Libelle Centre" width="200" color="#040404"/>
                                            <mx:Text width="152" color="#060606" id="txtPrenomCollaborateur" fontFamily="Arial" fontSize="12"/>
     
                                        </mx:HBox>
     
     
     
                                        <mx:HBox width="100%" paddingLeft="10" paddingRight="10" color="#030202" horizontalAlign="center">
     
                                            <mx:Label text="Ville" width="200"/>
                                            <mx:Text width="152" color="#060606" id="txtNomCollaborateur" fontFamily="Arial" fontSize="12"/>
     
                                        </mx:HBox>
     
     
     
                                        <mx:HBox width="100%" paddingLeft="10" paddingRight="10" horizontalAlign="center">
     
                                            <mx:Label text="Nom gérant" width="200" color="#040404"/>
                                            <mx:Text width="152" color="#060606" id="txtCINCollaborateur" fontFamily="Arial" fontSize="12"/>
     
                                        </mx:HBox>    
                                        <mx:HBox width="100%" paddingLeft="10" paddingRight="10" horizontalAlign="center">
                                            <mx:RadioButtonGroup id="MyG6"/>
                                            <mx:Button id= "btnAjouter" label="Ajouter" click="doCall()"/>
                                            <mx:Button id= "btnModifier" label="Modifier"/>
                                            <mx:Button label="Supprimer"/>
                                            <mx:Button label="Annuler" themeColor="#F9F5F5" borderColor="#F3F7FA" fontFamily="Arial"/>
     
                                        </mx:HBox>
     
     
     
                                    </mx:VBox>
     
     
     
     
     
     
                    </mx:Accordion>
     
                </mx:Panel>
     
            </mx:HBox>
     
    </mx:VBox> 
     
    </mx:Application>
    Fichier web.xml :

    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
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
     
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
     
        <display-name>EdsEstivageVues</display-name>
        <description>BlazeDS Application</description>
     
        <context-param>
            <param-name>flex.class.path</param-name>
            <param-value>/WEB-INF/flex/hotfixes,/WEB-INF/flex/jars</param-value>
        </context-param>
     
        <context-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/classes/applicationContext.xml</param-value>
        </context-param>
     
        <!-- Chemin d'acces au fichier de configuration Spring -->
        <context-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/classes/applicationContext.xml</param-value>
        </context-param>
     
        <!-- Spring listener -->
        <listener>
            <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
        </listener>
     
     
        <!-- Http Flex Session attribute and binding listener support -->
        <listener>
            <listener-class>flex.messaging.HttpFlexSession</listener-class>
        </listener>
     
        <!-- MessageBroker Servlet -->
        <servlet>
            <servlet-name>MessageBrokerServlet</servlet-name>
            <display-name>MessageBrokerServlet</display-name>
            <servlet-class>flex.messaging.MessageBrokerServlet</servlet-class>
            <init-param>
                <param-name>services.configuration.file</param-name>
                <param-value>/WEB-INF/flex/services-config.xml</param-value>
           </init-param>
            <load-on-startup>1</load-on-startup>
        </servlet>
     
        <servlet-mapping>
            <servlet-name>MessageBrokerServlet</servlet-name>
            <url-pattern>/messagebroker/*</url-pattern>
        </servlet-mapping>
     
        <welcome-file-list>
            <welcome-file>index.html</welcome-file>
            <welcome-file>index.htm</welcome-file>
        </welcome-file-list>
     
        <!-- for WebSphere deployment, please uncomment -->
        <!--
        <resource-ref>
            <description>Flex Messaging WorkManager</description>
            <res-ref-name>wm/MessagingWorkManager</res-ref-name>
            <res-type>com.ibm.websphere.asynchbeans.WorkManager</res-type>
            <res-auth>Container</res-auth>
            <res-sharing-scope>Shareable</res-sharing-scope>
        </resource-ref>
        -->
     
    </web-app>
    Fichier "applicationContext.xml" :

    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
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
     
     
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN //EN" " http://www.springframework.org/dtd/spring-beans.dtd">
    <beans>
     
        <!-- ========================= RESOURCE DEFINITIONS ========================= -->
     
        <bean id="dataSource"
            class="org.springframework.jdbc.datasource.DriverManagerDataSource">
            <property name="driverClassName">
                <value>com.mysql.jdbc.Driver</value>
            </property>
            <property name="url">
                <value>jdbc:mysql://localhost:3306/dbEstivage</value>
            </property>
            <property name="username">
                <value>root</value>
            </property>
            <property name="password">
                <value>root</value>
            </property>
        </bean>
     
        <!-- Hibernate SessionFactory -->
     
        <bean id="sessionFactory"
            class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
            <property name="dataSource">
                <ref local="dataSource" />
            </property>
            <property name="mappingResources">
                <list>
     
                    <value>Role.hbm.xml</value>
     
                </list>
     
            </property>
            <property name="hibernateProperties">
                <props>
                    <prop key="hibernate.dialect">
                        org.hibernate.dialect.MySQLDialect
                    </prop>
                    <prop key="hibernate.show_sql">true</prop>
                </props>
            </property>
        </bean>
     
        <!--**** Transaction manager for a single Hibernate SessionFactory (alternative to JTA)****** -->
     
        <bean id="transactionManager"
            class="org.springframework.orm.hibernate3.HibernateTransactionManager">
            <property name="sessionFactory">
                <ref local="sessionFactory" />
            </property>
        </bean>
     
        <!--**************Data access object: Hibernate implementation.********************-->
     
        <bean id="tester" class="service.RoleDaoImpl">
            <property name="dao" ref="dao" />
            <property name="sessionFactory" ref="sessionFactory" />
        </bean>
        <bean id="dao" class="dataAcessObject.DaoRoleImpl">
            <property name="sessionFactory" ref="sessionFactory" />
        </bean> 
     
    </beans>
    Fichier "services-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
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
     
     
    <?xml version="1.0" encoding="UTF-8"?>
    <services-config>
     
        <services>
            <service-include file-path="remoting-config.xml" />
            <service-include file-path="proxy-config.xml" />
            <service-include file-path="messaging-config.xml" />        
        </services>
     
        <security>
            <login-command class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/>
            <!-- Uncomment the correct app server
            <login-command class="flex.messaging.security.TomcatLoginCommand" server="JBoss">
            <login-command class="flex.messaging.security.JRunLoginCommand" server="JRun"/>        
            <login-command class="flex.messaging.security.WeblogicLoginCommand" server="Weblogic"/>
            <login-command class="flex.messaging.security.WebSphereLoginCommand" server="WebSphere"/>
            -->
     
            <!-- 
            <security-constraint id="basic-read-access">
                <auth-method>Basic</auth-method>
                <roles>
                    <role>guests</role>
                    <role>accountants</role>
                    <role>employees</role>
                    <role>managers</role>
                </roles>
            </security-constraint>
             -->
        </security>
     
        <channels>
     
            <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
                <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
            </channel-definition>
     
            <channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel">
                <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>
                <properties>
                    <add-no-cache-headers>false</add-no-cache-headers>
                </properties>
            </channel-definition>
     
            <channel-definition id="my-polling-amf" class="mx.messaging.channels.AMFChannel">
                <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
                <properties>
                    <polling-enabled>true</polling-enabled>
                    <polling-interval-seconds>4</polling-interval-seconds>
                </properties>
            </channel-definition>
     
            <!--
            <channel-definition id="my-http" class="mx.messaging.channels.HTTPChannel">
                <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/http" class="flex.messaging.endpoints.HTTPEndpoint"/>
            </channel-definition>
     
            <channel-definition id="my-secure-http" class="mx.messaging.channels.SecureHTTPChannel">
                <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/httpsecure" class="flex.messaging.endpoints.SecureHTTPEndpoint"/>
                <properties>
                    <add-no-cache-headers>false</add-no-cache-headers>
                </properties>
            </channel-definition>
            -->
        </channels>
     
        <logging>
            <target class="flex.messaging.log.ConsoleTarget" level="Error">
                <properties>
                    <prefix>[BlazeDS] </prefix>
                    <includeDate>false</includeDate>
                    <includeTime>false</includeTime>
                    <includeLevel>false</includeLevel>
                    <includeCategory>false</includeCategory>
                </properties>
                <filters>
                    <pattern>Endpoint.*</pattern>
                    <pattern>Service.*</pattern>
                    <pattern>Configuration</pattern>
                </filters>
            </target>
        </logging>
     
        <system>
            <redeploy>
                <enabled>false</enabled>
                <!-- 
                <watch-interval>20</watch-interval>
                <watch-file>{context.root}/WEB-INF/flex/services-config.xml</watch-file>
                <watch-file>{context.root}/WEB-INF/flex/proxy-config.xml</watch-file>
                <watch-file>{context.root}/WEB-INF/flex/remoting-config.xml</watch-file>
                <watch-file>{context.root}/WEB-INF/flex/messaging-config.xml</watch-file>
                <watch-file>{context.root}/WEB-INF/flex/data-management-config.xml</watch-file>
                <touch-file>{context.root}/WEB-INF/web.xml</touch-file>
                 -->
            </redeploy>
        </system>
     
        <factories>
            <factory id="SpringFactory" class="test.SpringFactory" />
        </factories>
     
    </services-config>
    Fichier "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
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
     
     
    <?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>
     
     
     
    <destination id="serviceDest">
     
        <properties>
            <factory>SpringFactory</factory>
            <source>tester</source>
        </properties>
     
    </destination>
     
    </service>
    La classe "Tester.java" :

    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
    30
     
     
    package test;
     
    import model.Role;
     
    import org.springframework.context.ApplicationContext;
    import org.springframework.context.support.ClassPathXmlApplicationContext;
    import service.IRoleDao;
    import junit.framework.TestCase;
     
    public class Tester extends TestCase {
     
        static ApplicationContext context;
     
        protected void setUp() throws Exception {
            context = new ClassPathXmlApplicationContext("applicationContext.xml");
     
        }
     
        public void test1() {
     
            IRoleDao service = (IRoleDao) context.getBean("tester");
            Role p = service.getRole(5);
            p.setLibellerole("aicha");
            service.UpdateRole(p);
     
        }
     
    }
    Merci infiniment d'avance de votre aide, je suis vraiment bloquée .

    Je souhaite avoir n'importe quel conseil ou guide, des cours ou des turoriels que vous jugerez utiles.

    Je serai vraiment reconnaissante.

    Merci beaucoup

  2. #2
    Membre expérimenté

    Profil pro
    Inscrit en
    Mai 2006
    Messages
    895
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2006
    Messages : 895
    Points : 1 710
    Points
    1 710
    Par défaut
    Bonjour,

    Je ne comprend pas vraiment ce que tu as fait. Pourquoi essaies tu d'appeler un test unitaire côté Flex ?

    Ellène

  3. #3
    Futur Membre du Club
    Inscrit en
    Avril 2010
    Messages
    11
    Détails du profil
    Informations forums :
    Inscription : Avril 2010
    Messages : 11
    Points : 9
    Points
    9
    Par défaut Flex 3.0 : Problème dans le fichier « services-config.xml»
    Bonjour tout le monde :

    Merci Ellène pour votre réponse.

    Je m’excuse, J’ai copié par erreur un test unitaire au lieu de ma classe de service.

    Voila ma classe « ServicTest»que je tente d’appeler :
    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
    30
    31
    32
    33
     
    package test;
     
    import java.io.Serializable;
    import model.Role;
    import org.springframework.context.ApplicationContext;
    import org.springframework.context.support.ClassPathXmlApplicationContext;
    import service.IRoleDao;
     
    public class ServicTest implements Serializable {
     
    	public ServicTest() {
    		super();
    	}
     
    	private static final long serialVersionUID = 1L;
    	static ApplicationContext context;
     
    	protected void setUp() throws Exception {
    		context = new ClassPathXmlApplicationContext("applicationContext.xml");
     
    	}
     
    	public void test1() {
     
    		IRoleDao service = (IRoleDao) context.getBean("tester");
    		Role p = service.getRole(5);
    		p.setLibellerole("aicha");
    		service.UpdateRole(p);
     
    	}
     
    }
    Vue « AddCentre.mxml » :

    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
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
     
    <?xml version="1.0" encoding="utf-8"?>
     
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" horizontalAlign="center" width="100%" height="100%"  backgroundColor="#000000"
     
    	 styleName="back" paddingLeft="20" paddingBottom="0" verticalScrollPolicy="off" paddingRight="20" paddingTop="0" viewSourceURL="srcview/index.html">
     
     
    <mx:Script>
     
     
    		<![CDATA[
    			import mx.rpc.events.FaultEvent;
    			import mx.rpc.events.ResultEvent;
     
     
    			private function doCall():void{
    				roService.test1();
    			}
     
    			/**
    			 * Méthode invoquée en cas de succès de l'appel RPC 
    			 */ 
    			private function onResult(event : ResultEvent):void{
    				// Afficher la réponse
    				txtCodeCollaborateur.text = event.result as String;
     
    			}
     
    			/**
    			 * Méthode invoquée en cas d'échec de l'appel RPC 
    			 */ 
    			private function onFault(event : FaultEvent):void{
    				// Afficher le message d'erreur
    				txtCodeCollaborateur.text = event.fault.message;
    			}
     
    		]]>
     
     
    </mx:Script>
     
    <mx:RemoteObject id="roService" destination="serviceDest" result="onResult(event)" fault="onFault(event)"/>
     
     
     
    	<mx:Style source="css/classicOrange.css"/>
     
     
     
    	<mx:DropShadowFilter blurY="5" blurX="5" angle="90" color="#000000" alpha=".6" id="dropShadowFilter"/>  
     
    	<mx:DropShadowFilter blurY="2" blurX="2" angle="45" distance="2" color="#000000" alpha=".8" id="dropShadowFilter2"/>
     
    	<mx:GlowFilter blurX="20" id="glowFilter" color="#000000"/>
     
    	<mx:VBox backgroundColor="#cccccc" width="1000" height="100%" verticalGap="10" paddingLeft="10" paddingRight="10" filters="{[glowFilter]}" paddingBottom="20" borderSides="['left','right']" borderStyle="inset" borderColor="#808080">
     
    		<mx:ApplicationControlBar width="100%" height="50" verticalAlign="middle" filters="{[dropShadowFilter]}" paddingTop="0" paddingLeft="20" paddingRight="20">
     
    			<mx:Image source="images/logo.png" height="40"/>
     
    			<mx:Spacer width="100%"/>
     
    			<mx:HBox verticalAlign="top" height="100%" paddingTop="1" paddingRight="10">
     
    				<mx:LinkBar dataProvider="{pages}"/>
     
    				<mx:ViewStack id="pages" width="1" height="100%">
     
    					<mx:Canvas label="A propos de nous "/>
     
    					<mx:Canvas label="Contact"/>
     
    					<mx:Canvas label="Se déconnecter"/>
     
    				</mx:ViewStack>	
     
    			</mx:HBox>
     
    			</mx:ApplicationControlBar>	
     
    		<mx:MenuBar width="100%" x="0" y="0"  height="20" labelField="@label"/>		
     
    		<mx:HBox width="100%" height="100%">
     
     
     
    			<mx:Panel width="100%" height="100%" title="Bienvenue" styleName="Panel2" layout="vertical">
     
     
     
    				<mx:Accordion width="100%" height="100%">
     
    					<mx:VBox width="100%" height="100%" label="Ajouter un Centre" horizontalAlign="center"  >
     
    									<mx:HBox width="100%" paddingLeft="10" paddingRight="10" horizontalAlign="center">
     
    										<mx:Label width="200" color="#030303" text="Code Centre"/>
    										<mx:Text width="152" color="#060606" id="txtCodeCollaborateur" fontFamily="Arial" fontSize="12"/>
     
    										<mx:RadioButtonGroup id="MyG"/>
     
    									</mx:HBox>												
     
     
     
    									<mx:HBox width="100%" paddingLeft="10" paddingRight="10" horizontalAlign="center">
     
    										<mx:Label text="Libelle Centre" width="200" color="#040404"/>
    										<mx:Text width="152" color="#060606" id="txtPrenomCollaborateur" fontFamily="Arial" fontSize="12"/>
     
    									</mx:HBox>
     
     
     
    									<mx:HBox width="100%" paddingLeft="10" paddingRight="10" color="#030202" horizontalAlign="center">
     
    										<mx:Label text="Ville" width="200"/>
    										<mx:Text width="152" color="#060606" id="txtNomCollaborateur" fontFamily="Arial" fontSize="12"/>
     
    									</mx:HBox>
     
     
     
    									<mx:HBox width="100%" paddingLeft="10" paddingRight="10" horizontalAlign="center">
     
    										<mx:Label text="Nom gérant" width="200" color="#040404"/>
    										<mx:Text width="152" color="#060606" id="txtCINCollaborateur" fontFamily="Arial" fontSize="12"/>
     
    									</mx:HBox>	
    									<mx:HBox width="100%" paddingLeft="10" paddingRight="10" horizontalAlign="center">
    										<mx:RadioButtonGroup id="MyG6"/>
    										<mx:Button id= "btnAjouter" label="Ajouter" click="doCall()"/>
    										<mx:Button id= "btnModifier" label="Modifier"/>
    										<mx:Button label="Supprimer"/>
    										<mx:Button label="Annuler" themeColor="#F9F5F5" borderColor="#F3F7FA" fontFamily="Arial"/>
     
    									</mx:HBox>
     
     
     
    								</mx:VBox>
     
     
     
     
     
     
    				</mx:Accordion>
     
    			</mx:Panel>
     
    		</mx:HBox>
     
    </mx:VBox> 
     
    </mx:Application>

    Fichier « applicationContext.xml » :

    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
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
     
     
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN //EN" " http://www.springframework.org/dtd/spring-beans.dtd">
    <beans>
     
    	<!-- ========================= RESOURCE DEFINITIONS ========================= -->
     
    	<bean id="dataSource"
    		class="org.springframework.jdbc.datasource.DriverManagerDataSource">
    		<property name="driverClassName">
    			<value>com.mysql.jdbc.Driver</value>
    		</property>
    		<property name="url">
    			<value>jdbc:mysql://localhost:3306/dbEstivage</value>
    		</property>
    		<property name="username">
    			<value>root</value>
    		</property>
    		<property name="password">
    			<value>root</value>
    		</property>
    	</bean>
     
    	<!-- Hibernate SessionFactory -->
     
    	<bean id="sessionFactory"
    		class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
    		<property name="dataSource">
    			<ref local="dataSource" />
    		</property>
    		<property name="mappingResources">
    			<list>
     
    				<value>Role.hbm.xml</value>
     
    			</list>
     
    		</property>
    		<property name="hibernateProperties">
    			<props>
    				<prop key="hibernate.dialect">
    					org.hibernate.dialect.MySQLDialect
    				</prop>
    				<prop key="hibernate.show_sql">true</prop>
    			</props>
    		</property>
    	</bean>
     
    	<!--**** Transaction manager for a single Hibernate SessionFactory (alternative to JTA)****** -->
     
    	<bean id="transactionManager"
    		class="org.springframework.orm.hibernate3.HibernateTransactionManager">
    		<property name="sessionFactory">
    			<ref local="sessionFactory" />
    		</property>
    	</bean>
     
    	<!--**************Data access object: Hibernate implementation.********************-->
     
    	<bean id="ServicTest" class="service.RoleDaoImpl">
    		<property name="dao" ref="dao" />
    		<property name="sessionFactory" ref="sessionFactory" />
    	</bean>
    	<bean id="dao" class="dataAcessObject.DaoRoleImpl">
    		<property name="sessionFactory" ref="sessionFactory" />
    	</bean> 
     
    </beans>
    Fichier "services-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
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
     
     
    <?xml version="1.0" encoding="UTF-8"?>
    <services-config>
     
        <services>
            <service-include file-path="remoting-config.xml" />
            <service-include file-path="proxy-config.xml" />
            <service-include file-path="messaging-config.xml" />        
        </services>
     
        <security>
            <login-command class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/>
            <!-- Uncomment the correct app server
            <login-command class="flex.messaging.security.TomcatLoginCommand" server="JBoss">
    		<login-command class="flex.messaging.security.JRunLoginCommand" server="JRun"/>        
            <login-command class="flex.messaging.security.WeblogicLoginCommand" server="Weblogic"/>
            <login-command class="flex.messaging.security.WebSphereLoginCommand" server="WebSphere"/>
            -->
     
            <!-- 
            <security-constraint id="basic-read-access">
                <auth-method>Basic</auth-method>
                <roles>
                    <role>guests</role>
                    <role>accountants</role>
                    <role>employees</role>
                    <role>managers</role>
                </roles>
            </security-constraint>
             -->
        </security>
     
        <channels>
     
            <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
                <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
            </channel-definition>
     
            <channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel">
                <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>
                <properties>
                    <add-no-cache-headers>false</add-no-cache-headers>
                </properties>
            </channel-definition>
     
            <channel-definition id="my-polling-amf" class="mx.messaging.channels.AMFChannel">
                <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
                <properties>
                    <polling-enabled>true</polling-enabled>
                    <polling-interval-seconds>4</polling-interval-seconds>
                </properties>
            </channel-definition>
     
            <!--
            <channel-definition id="my-http" class="mx.messaging.channels.HTTPChannel">
                <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/http" class="flex.messaging.endpoints.HTTPEndpoint"/>
            </channel-definition>
     
            <channel-definition id="my-secure-http" class="mx.messaging.channels.SecureHTTPChannel">
                <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/httpsecure" class="flex.messaging.endpoints.SecureHTTPEndpoint"/>
                <properties>
                    <add-no-cache-headers>false</add-no-cache-headers>
                </properties>
            </channel-definition>
            -->
        </channels>
     
        <logging>
            <target class="flex.messaging.log.ConsoleTarget" level="Error">
                <properties>
                    <prefix>[BlazeDS] </prefix>
                    <includeDate>false</includeDate>
                    <includeTime>false</includeTime>
                    <includeLevel>false</includeLevel>
                    <includeCategory>false</includeCategory>
                </properties>
                <filters>
                    <pattern>Endpoint.*</pattern>
                    <pattern>Service.*</pattern>
                    <pattern>Configuration</pattern>
                </filters>
            </target>
        </logging>
     
        <system>
            <redeploy>
                <enabled>false</enabled>
                <!-- 
                <watch-interval>20</watch-interval>
                <watch-file>{context.root}/WEB-INF/flex/services-config.xml</watch-file>
                <watch-file>{context.root}/WEB-INF/flex/proxy-config.xml</watch-file>
                <watch-file>{context.root}/WEB-INF/flex/remoting-config.xml</watch-file>
                <watch-file>{context.root}/WEB-INF/flex/messaging-config.xml</watch-file>
                <watch-file>{context.root}/WEB-INF/flex/data-management-config.xml</watch-file>
                <touch-file>{context.root}/WEB-INF/web.xml</touch-file>
                 -->
            </redeploy>
        </system>
     
        <factories>
    		<factory id="SpringFactory" class="test.SpringFactory" />
        </factories>
     
    </services-config>
    Fichier "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
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
     
     
    <?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>
     
     
     
    <destination id="serviceDest">
     
    	<properties>
    		<factory>SpringFactory</factory>
    		<source>ServicDest</source>
    	</properties>
     
    </destination>
     
    </service>
    Fichier web.xml :

    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
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
     
     
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
     
        <display-name>EdsEstivageVues</display-name>
        <description>BlazeDS Application</description>
     
    	<context-param>
    		<param-name>flex.class.path</param-name>
    		<param-value>/WEB-INF/flex/hotfixes,/WEB-INF/flex/jars</param-value>
    	</context-param>
     
     
     
        <!-- Chemin d'acces au fichier de configuration Spring -->
        <context-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/classes/applicationContext.xml</param-value>
        </context-param>
     
        <!-- Spring listener -->
        <listener>
            <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
        </listener>
     
     
        <!-- Http Flex Session attribute and binding listener support -->
        <listener>
            <listener-class>flex.messaging.HttpFlexSession</listener-class>
        </listener>
     
        <!-- MessageBroker Servlet -->
        <servlet>
            <servlet-name>MessageBrokerServlet</servlet-name>
            <display-name>MessageBrokerServlet</display-name>
            <servlet-class>flex.messaging.MessageBrokerServlet</servlet-class>
            <init-param>
                <param-name>services.configuration.file</param-name>
                <param-value>/WEB-INF/flex/services-config.xml</param-value>
           </init-param>
            <load-on-startup>1</load-on-startup>
        </servlet>
     
        <servlet-mapping>
            <servlet-name>MessageBrokerServlet</servlet-name>
            <url-pattern>/messagebroker/*</url-pattern>
        </servlet-mapping>
     
        <welcome-file-list>
            <welcome-file>index.html</welcome-file>
            <welcome-file>index.htm</welcome-file>
        </welcome-file-list>
     
        <!-- for WebSphere deployment, please uncomment -->
        <!--
        <resource-ref>
            <description>Flex Messaging WorkManager</description>
            <res-ref-name>wm/MessagingWorkManager</res-ref-name>
            <res-type>com.ibm.websphere.asynchbeans.WorkManager</res-type>
            <res-auth>Container</res-auth>
            <res-sharing-scope>Shareable</res-sharing-scope>
        </resource-ref>
        -->
     
    </web-app>
    Quand je clique sur le bouton possédant l’identifiant id= "btnAjouter" je reçois l’erreur suivante :
    faultCode:InvokeFailed faultString:'[MessagingError message='Destination 'serviceDest' either does not exist or the destination has no channels defined (and the application does not define any default channels.)']' faultDetail:'Couldn't establish a connection to 'serviceDest''

    Voici la trace d’erreur :


    **** MessageBrokerServlet failed to initialize due to runtime exception: Error: java.lang.NoSuchFieldError: ANY_HOST_CONFIGURATION
    at org.apache.commons.httpclient.params.HttpConnectionManagerParams.setDefaultMaxConnectionsPerHost(HttpConnectionManagerParams.java:85)
    at flex.messaging.services.http.HTTPProxyAdapter.initHttpConnectionManagerParams(HTTPProxyAdapter.java:698)
    at flex.messaging.services.http.HTTPProxyAdapter.setConnectionManagerSettings(HTTPProxyAdapter.java:513)
    at flex.messaging.services.http.HTTPProxyAdapter.initialize(HTTPProxyAdapter.java:348)
    at flex.messaging.config.MessagingConfiguration.createAdapter(MessagingConfiguration.java:375)
    at flex.messaging.config.MessagingConfiguration.createDestination(MessagingConfiguration.java:364)
    at flex.messaging.config.MessagingConfiguration.createServices(MessagingConfiguration.java:332)
    at flex.messaging.config.MessagingConfiguration.configureBroker(MessagingConfiguration.java:100)
    at flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:129)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3917)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4201)
    at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2990)
    at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:403)
    at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1277)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1569)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1578)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1578)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1558)
    at java.lang.Thread.run(Thread.java:595)

    1 avr. 2010 14:05:47 org.apache.catalina.core.ApplicationContext log
    INFO: La servlet MessageBrokerServlet est marqué comme indisponible
    1 avr. 2010 14:05:47 org.apache.catalina.core.StandardContext loadOnStartup
    GRAVE: La servlet /EdsEstivageVues a généré une exception "load()"
    javax.servlet.UnavailableException: ANY_HOST_CONFIGURATION
    at flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:170)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3917)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4201)
    at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2990)
    at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:403)
    at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1277)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1569)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1578)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1578)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1558)
    at java.lang.Thread.run(Thread.java:595)

    J’ai besoin vraiment de vos suggestions.

    Merci infiniment d’avance.

  4. #4
    Membre expérimenté

    Profil pro
    Inscrit en
    Mai 2006
    Messages
    895
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2006
    Messages : 895
    Points : 1 710
    Points
    1 710
    Par défaut
    Si tu pouvais ne pas mettre tout le code qui n'est pas utile mais juste l'essentiel ça serait sympa car ce n'est pas du tout lisible (exemple : je n'ai pas besoin de TOUT ton fichier MXML par exemple).

    Bref je ne sais pas vraiment d'où peut venir l'erreur pour le moment ... mais en faisant des recherches sur internet avec un bout de ta stacktrace, je vois que des gens ont eu ton problème alors qu'ils utilisent Websphere. D'où ma question : sur quel serveur déploies tu ? Et quel version ?

    ++

  5. #5
    Futur Membre du Club
    Inscrit en
    Avril 2010
    Messages
    11
    Détails du profil
    Informations forums :
    Inscription : Avril 2010
    Messages : 11
    Points : 9
    Points
    9
    Par défaut
    Bonjour,

    J'utilise le serveur Tomcat version 5.5.

    En fait, j’ai essayé de faire aussi des recherches qui m'ont aidé à comprendre que j'ai un problème lors de la lecture du fichier de configuration "services-config.xml" de Flex .J'ai trouvé une proposition :

    - Dans le champ Click droit sur mon projet Flex ->Properties -> FlexCompiler -> Additional compiler arguments mettre le chemin de "services-config.xml" situé dans le webapps de Tomcat ,donc au lieu de
    -services D:/Workspace/EdsEstivageVues/WebContent/WEB-INF/flex/services-config.xml" -locale en_US
    Je dois utiliser
    -services "C:\Program Files\apache-tomcat-5.5.26\webapps\reclassification\WEB-INF\flex\services-confi g.xml" -locale en_US
    Or moi je ne possède pas le fichier services-config.xml dans ma répertoire webapps de mon Tomcat et aussi je ne trouve pas le fichier reclassification !

    J’ai déjà tenté de copier le fichier « services-config.xml » dans le répertoire suivant : C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\webdav\WEB-INF pour appliquer la proposition que j’ai trouvé, mais ça donne une erreur avec croix rouge sur le projet.

    Je m’excuse parce que j’ai mis du code inutile mais puisque je suis débutante en Flex et en développement J2EE, je ne sais pas vraiment qui pourra être utile ou non pour vous, c’est pour cela j’ai tous copier.

    Je suis vraiment reconnaissante, j’ai fais un retard de 2 mois à cause de mon blocage à chaque fois dans la partie Flex, J’ai vraiment besoin de vos propositions.

    Merci d'avance

  6. #6
    Futur Membre du Club
    Inscrit en
    Avril 2010
    Messages
    11
    Détails du profil
    Informations forums :
    Inscription : Avril 2010
    Messages : 11
    Points : 9
    Points
    9
    Par défaut
    Bonjour,

    Je suis toujours bloquée sur le même problème,je souhaite vivement recevoir vos suggestions.

    Après une longue recherche,je crois que la cause du problème peut être :

    * Soit que le fichier services-config est introuvable.
    * Soit que j'essaye d'appeler un objet distant or je travail sur une machine locale.Je pense ainsi parceque je recois l'erreur suivante:

    Error: java.lang.NoSuchFieldError: ANY_HOST_CONFIGURATION
    Je ne sais pas comment indiquer à Flex que j'appel des objets localement et qui ne sont pas des objets distants.

    J'ai enfin quelques doute sur les valeurs des propriétés que j'ai indiqué,notamment:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    <mx:RemoteObject id="roService" destination="serviceDest" source="">
    	
    <mx:method name="test1" result="onResult(event)" /> 
    
    </mx:RemoteObject>
    Ici,j'ai indiqué en rouge la propriété source,je ne sais pas la valeur de cet attribut?

    Dans la balise destination dans le fichier remoting-config.xml ,j'ai indiqué:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
     
    <destination id="serviceDest">
     
    	<properties>
    		<factory>SpringFactory</factory>
    		<source>ServicTest</source>
    	</properties>
     
    </destination>
    Est ce que la sous-balise source doit contenir le chemin complet du bean déclarée dans le fichier applicationContext?

    SVP,aidez moi

    Merci infiniment

  7. #7
    Membre habitué
    Profil pro
    Inscrit en
    Avril 2010
    Messages
    124
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2010
    Messages : 124
    Points : 156
    Points
    156
    Par défaut
    Bonjour,

    Bon tu as l'air bien perdue. Je vois tes posts sur plein de forums différents ;-)
    Ton problème ne vient probablement pas de ta config Flex (j'imagine que depuis le temps tu l'as checkée correctement).

    Quelle version de jar de commons-httpclient embarques-tu dans ton projet ? 3.01 ? 3.1 ? 4.0.1 ? Essaies-en une différente de celle que tu as.

    Charles.

Discussions similaires

  1. N'arrive pas à relancer mes codes php via UwAmp
    Par MauveHippocampe dans le forum Langage
    Réponses: 2
    Dernier message: 04/01/2015, 19h05
  2. Réponses: 18
    Dernier message: 28/08/2007, 11h56
  3. Réponses: 19
    Dernier message: 20/05/2007, 23h12
  4. Réponses: 2
    Dernier message: 26/02/2007, 15h06
  5. je n'arrive pas à interroger mon service web
    Par karimspace dans le forum Services Web
    Réponses: 2
    Dernier message: 09/02/2007, 19h33

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo