1 Reply Latest reply on Apr 24, 2008 6:24 AM by JKohn99

    Syncronous Web Service Call

      is there a way to make a synchronous web service call? i am quoting my problem. can anyone provide a solution to this? i appreciate that.

      i have designed a Multi-File Uploader. the Uploader upload the files on the server, now every time before uploading a file i need to perform pre-uploading validation like, whether there is enough space available to upload the particular file, the file-type is allowed by server etc etc ... if all goes well then it starts uploading the file. then there is also a post-upload validation which checks whether it is uploaded successfully or not? All is done here through Web Service Calls (i.e. for each file upload i had to make 3 webservice calls). (Remember i m working on a distributed file system environment) until the pre-validation is complete it must not start uploading the file. Now my problem is if i select 5-6 files of different sizes (of 10 or more MBs) it starts validating first by calling a web service (though validation is relatively a light process then actually uploading the file on the server). after that it starts uploading it, until the uploading is in process the actionscript executes the next call of post-validation on the same file, which in this case is wrong.
      can anyone answer this. one user 'Garag' has already posted this few days earlier. So Garag, you and I are facing same problem if u get any solution please let me know.
        • 1. Re: Syncronous Web Service Call
          JKohn99 Level 1
          The quick answer is it cannot be done. If you have server calls that depend on a specific order, you must initiate the next server call in the result handler of the first call.

          So make webservice1 call.

          In the result handler for webService1 verify the result and make
          webService2 call, etc.

          I seem to remember a post about a framework that does this, but I don't remember the name. You may want to search the group.

          We do this all the time as we need to make web service calls in a specific order to build the data we need.