Results 1 to 5 of 5

Thread: WebServices question. Sould be yes or no answer...I think.

Hybrid View

  1. #1

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Talking WebServices question. Sould be yes or no answer...I think.

    I have a web service. This has a function called Fetch. This function returns a dataset of data that has been taken from a DB table.
    Now if this is a few records then this takes a few ms. But if it's about 2-4 meg of data then this function takes quite a bit of time as it has to "collect it slowly"/"get it" over the LAN.

    What I want to know is, is there a way to monitor how much data has been retrieved as I would like to have a prog bar on a form.
    is this possible?

    Woof

  2. #2
    Hyperactive Member CyberHawke's Avatar
    Join Date
    May 2004
    Location
    Washington DC
    Posts
    477
    The short answer is no, it's not possible because in order to notify your client that a given amount of progress has been made, you would need to be able to raise events. This cannot be done with a web service. There may be some creative ways around this such as placing your function call in a separate thread and then creating another function that gathers the amount of progress made and returning it to the client.

    I feel your pain, I have spent several weeks on just this type of problem. I have a workable solution, but it's not a web service, I ended up creating a remote component on the server and having that raise events to all "Logged in" clients.

    If you want more detail just ask

  3. #3

  4. #4
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    All Web service methods are natively Asynchronous thanks to the IDE and the wrapper class it creates. The problem really is there is no way to get progress from the default delegate it creates. If you don't mind faking progress then you can increment a progress every couple of seconds to show progress although there is no way to tell total number of bytes or the current byte count. It only tells you when its done.

    To revist the previous Woka client example I did I have added an async call to get the dataset and beefed up the size of the dataset. It still runs fast for me since I'm local but it should be a decent example - providing you don't mind faking progress.

    I beefed up the dataset data even more on the actual web service I'm running too. So the file on the actual web server is 911K so you know for testing.
    Last edited by Edneeis; Jun 24th, 2004 at 11:41 PM.

  5. #5

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width