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
| <?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:servicessoap="services.servicessoap.*" >
<fx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.events.FlexEvent;
protected function button_clickHandler(event:MouseEvent):void
{
ouvrirSessionResult.token = servicesSOAP.ouvrirSession(parseInt('idModule'));
var idSession:int=ouvrirSessionResult.lastResult as int;
}
internal var idModule:int=14;
//internal var idS:int=1;
protected function button2_clickHandler(event:MouseEvent):void
{
authentifierUtilisateurResult.token = servicesSOAP.authentifierUtilisateur(parseInt('idModule'),parseInt('idSession'),"identifiant.text","mdp.text");
}
]]>
</fx:Script>
<fx:Declarations>
<servicessoap:ServicesSOAP id="servicesSOAP" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/>
<s:CallResponder id="ouvrirSessionResult"/>
<s:CallResponder id="authentifierUtilisateurResult"/>
<s:CallResponder id="ouvrirSessionResult2"/>
<!-- Placer ici les éléments non visuels (services et objets de valeur, par exemple). -->
</fx:Declarations>
<s:Button label="OuvrirSession" id="button" click="button_clickHandler(event)" x="76" y="44"/>
<s:TextInput x="81" y="181" id="identifiant"/>
<s:TextInput x="81" y="255" id="mdp"/>
<s:Button x="98" y="325" label="Button" id="button2" click="button2_clickHandler(event)"/>
<s:TextArea x="249" y="45" height="20" id="textArea" text="{ouvrirSessionResult.lastResult}"/>
// aprés le succés de l'authentification ,j'affiche le resultat (certificat)
<s:TextArea x="393" y="220" height="73" id="textArea2" text="{authentifierUtilisateurResult.lastResult}"/>
</s:Application> |
Partager