Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

Talking to a webservice twice at once...?

Last post 04-25-2008 11:54 AM by kruelintent. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-22-2008 2:04 PM

    • kruelintent
    • Top 200 Contributor
    • Joined on 01-02-2003
    • United Kingdom
    • Addicted Member
    • Points 700

    Talking to a webservice twice at once...?

    Hi,

    I have my new webservice and I can talk to it in my client side javascript but when I call a seperate function asyncronously it seems to use a new instance of the webservice... not what I want...

    In the webservice the DoStuff function takes a minute or so but while it runs it is keeping a webservice global variable up to date with a progress percentage. I am then calling another function GetProgress to get this progress - the idea being to display this to the client to get an idea of server side progress...

    I am trying something along the following lines but getting 0 returned always (as if it is a new instance of the webservice class)....

    var TT;

    function Dothings(){
     TT = new TomTest; //Get new instance of the webservice class.
     TT.DoLots(onComplete);
     getmethodprogess();
    }

    function getmethodprogess(){
     TT.GetProgress(UpdateProgress);
     t=setTimeout('getmethodprogess()',1000);
    }

    function UpdateProgress(arg){
     document.getElementById('DIVpro2').innerHTML = arg + '% complete..';
    }

    function onComplete(arg){
     alert(arg); //Show the FINISHED! text alert...
    }

    Any words of wisdom?
    Thanks in advance

    Tom.

     

    • Post Points: 5
  • 04-25-2008 11:54 AM In reply to

    • kruelintent
    • Top 200 Contributor
    • Joined on 01-02-2003
    • United Kingdom
    • Addicted Member
    • Points 700

    Re: Talking to a webservice twice at once...?

    Not to worry. I worked this out. Damn stateless webservices.....
    • Post Points: 5
Page 1 of 1 (2 items)