Posted By

mprabhuram on 07/15/09


Tagged

webserviceflex


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

publicbroadcast


Webservice


 / Published in: ActionScript 3
 

Use this code snippet to access webservices from the actionscript/ Flex code

  1. public var WebserviceURL:String;
  2. public var service:WebService;
  3.  
  4. public function accessWebService():void
  5. {
  6. service = new WebService();
  7. WebserviceURL = "http://mywebserver.net/webService.asmx?wsdl";
  8. service.wsdl = WebserviceURL;
  9. service.addEventListener(ResultEvent.RESULT,webServiceResultHandler);
  10.  
  11. service.loadWSDL();
  12. service.GetCallHistory(username, 1, PageNo);
  13.  
  14. }
  15.  
  16. public function webServiceResultHandler(event:ResultEvent):void
  17. {
  18. var result:ArrayCollection = event.result as ArrayCollection;
  19. dgVideoHistory.dataProvider = result;
  20. }

Report this snippet  

You need to login to post a comment.