Nom d'opérations d'un WebService avec un .
Bonjour,
Je dois utiliser des WebService dans mon application flex.
Or dans le wsdl qu'on me fourni, le nom des opérations comporte un point (' . ')
exemple :
Code:
<wsdl:operation name="CheckLogin__1.0Op">
Du coup forcément quand je veux appeler cette métode comme ceci :
Code:
webService.CheckLogin__1.0Op.send(obj);
j'ai une erreur, parce que flex ne connait pas la méthode "CheckLogin__1". Forcément...
Y a-t-il un moyen de contourner ce problème sans avoir à changer le wsdl?
code "complet" :
Code:
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
|
<?xml version="1.0" encoding="utf-8"?>
<s:Panel xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Script>
<![CDATA[
import business.WebServiceXML;
import model.vo.User;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
private function onConnect():void
{
//[...]
webService.CheckLogin__1.0Op.send(xml);
}
private function checkLoginResult(event:ResultEvent):void
{
//[...]
}
private function checkLoginFault(event:FaultEvent):void
{
// [...]
}
]]>
</fx:Script>
<fx:Declarations>
<mx:WebService id="webService"
wsdl="http://localhost:8088/CheckLogin?WSDL"
service="ESBAdminManagement_1.0-service.serviceagent"
port="ESBAdminManagementEndpoint">
<mx:operation name="CheckLogin__1.0Op" resultFormat="xml"
result="checkLoginResult(event)"
fault="checkLoginFault(event)" />
</mx:WebService>
</fx:Declarations>
<mx:Form id="form" defaultButton="{connectButton}">
<mx:FormItem label="Utilisateur">
<s:TextInput id="usrInput" />
</mx:FormItem>
<mx:FormItem label="Mot de passe">
<s:TextInput id="pwdInput" />
</mx:FormItem>
<mx:FormItem id="fIValidate">
<s:Button id="connectButton"
label="Connection"
click="onConnect()" />
</mx:FormItem>
</mx:Form>
</s:Panel> |