Voici mon code mxml :
le web service est un simple hello world en c#
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 <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Label id="lblResult" x="259" y="67"/> <mx:Script> <![CDATA[ private function clickHandler():void { lblResult.text=firstService.HelloWorld.send(); lblResult.text=firstService.HelloWorld.lastResult; } ]]> </mx:Script> <mx:Button x="129" y="65" label="Button" click="clickHandler()"/> <mx:WebService id="firstService" wsdl="http://services.truc.fr/service1.asmx?WSDL"> <mx:operation name="HelloWorld"/> </mx:WebService> </mx:Application>
A chaque fois que je lance mon application flex elle ne me renvoie pas le contenu du webservice, où ais-je commis une erreur ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 public class Service1 : System.Web.Services.WebService { [WebMethod] public string HelloWorld(string firstName) { return "Hello World "+firstName; } } }
Merci de votre aide
Partager