1 Reply Latest reply on Oct 28, 2009 7:13 AM by Selva Vasanth

    Download a XML File From Web Services Using Flex

    Selva Vasanth Level 1

      Hi All...

       

      I am new for flex, im developing an windows application using Flex/Air, i have connected the web services with user authentication, now I want to download a xml file using web services in flex,

      how can i do this?? please reply...


      Thanks in advance

       

      Vasanth

        • 1. Re: Download a XML File From Web Services Using Flex
          Selva Vasanth Level 1

          Hi All....


          I have done this myself using sample tutorials...


          here is the code for your reference guys



                    plyLoginName = txtEmailIdDownload.text;                
                           var urlpath:String = new String("your url p?LoginName=");
                          urlpath = new String(urlpath.concat(plyLoginName));
                          urlpath = new String(urlpath.concat("&PlayerType="));
                          urlpath = new String(urlpath.concat(chkseasonvalue));
                          Alert.show(urlpath);
                      var request:URLRequest = new URLRequest(urlpath)
                      var fileRef:FileReference = new FileReference();           
                      fileRef.download(request,"yourfilename.xml");
                      Alert.show('File downloaded Successfully');   
                       txtEmailIdDownload.text = "";
                      txtPWDownload.text = "";



          thanks


          Vasanth