Skip navigation
Antonietta123
Currently Being Moderated

How  do I diplay data from a webservice?

Jul 9, 2013 5:41 PM

I tried to display data from a webservice but I get null back. Does anybody know how it works?

 

private function init(): void

                              {

                                        webService = new WebService();

                                        webService.addEventListener(LoadEvent.LOAD, onLoad);

                                        webService.addEventListener(FaultEvent.FAULT, onFault);

                                        webService.loadWSDL("http://gamepc06.fh-trier.de:8080/CFService.asmx?WSDL");

 

 

                              }

 

                              private function onLoad(event: LoadEvent):void

                              {

                                        event.target.removeEventListener(LoadEvent.LOAD, onLoad);

                                        currentState = "login"

 

                                        //Test

 

                                        webService.getOperation("List").addEventListener(ResultEvent.RESULT,o nResult);

                                        webService.getOperation("List").send();

 

 

                              }

 

 

 

private function onResult(event:ResultEvent):void

                              {

 

                                        var collection:ArrayCollection = event.target as ArrayCollection

                                  list.dataProvider = collection

 

 

                                        list.labelField = "HostName";

                              }

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points