1 Reply Latest reply on Apr 14, 2008 9:39 PM by ntsiii

    Help to connect to a webservice

      hi, i'm new in flex, I don't know to much of flex, but, I have a problem connecting to a webservice, mentions that there is no property "user" of webservice, even using the method addEventListener, I hope you can help.

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout= "absolute" creationComplete="loadWebService()" width="1582" height="1199">

      import mx.rpc.Fault;
      import mx.rpc.events.FaultEvent;
      import mx.rpc.events.ResultEvent;
      import mx.rpc.soap.LoadEvent;
      import mx.rpc.soap.WebService;
      import mx.controls.Alert;

      private var webService:WebService = new WebService();
      private function loadWebService():void
      webService.wsdl = "webservice direction...";
      webService.addEventListener(LoadEvent.LOAD , onWSDL);
      webService.addEventListener(FaultEvent.FAULT, onWebServiceFault);
      private function onWSDL(event:LoadEvent):void
      webService.Login.addEventListener(ResultEvent.RESULT, XonLogin);
      private function XonLogin ( event : ResultEvent ) : void
      textuser.text = event.result.user;
      private function onWebServiceFault( event : FaultEvent ): void
      var fault: Fault = event.fault;
      var message:String = "An error occurred. The details are as follows\ncode: " + fault.faultCode;
      message += "\ndetail: " + fault.faultDetail;
      trace("Web Service Error :" + message);

      i repeat, im new on this area jeje

      thanks for you help