Kyus,
I hope I'm not misunderstanding your problem. If you need to cancel an webservice call you've made from the client, you can modify the code found here to do it: http://geekswithblogs.net/rashid/archive/2007/07/14/Cancel-a-Web-Service-Call-in-Asp.net-Ajax.aspx
The only requirement is that instead of using the simplified method for calling web services, you'll have to use a proxy method to do it. Invoking the proxy method returns a WebRequest object which you can save off to a variable. When you make additional calls, and want to cancel the previous one, you just need to call the WebRequest to get the executor object and call abort() on it.
Here's a simple example. I'm hooking up two buttons to call two different service methods, HelloWorld and GoodByeWorld on WebService1 and WebService2, respectively. Before invoking GoodbyeWorld, we check to see if there is a service currently running using client script and abort it if it is. Hopefully the sample makes sense to you:
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Services>
<asp:ServiceReference Path="~/WebService1.asmx" />
<asp:ServiceReference Path="~/WebService2.asmx" />
</Services>
</asp:ScriptManager>
<script language="javascript" type="text/javascript">var lastExecutor;
function helloWorld()
{
var service = Sys.Net.WebServiceProxy.invoke('WebService1.asmx', 'HelloWorld', false, {}, success, fail, '', -1);
lastExecutor = service.get_executor();
}
function goodbyeWorld()
{
if(lastExecutor != null)
{
if(lastExecutor.get_started())
{
lastExecutor.abort();
}
}
var service2 = WebApplication7.WebService2.GoodbyeWorld(success,fail);
}
function success(res)
{
alert(res);
}
function fail(res)
{
alert('fail');
}
</script>
<div><input id="Button1" type="button" value="button" onclick="helloWorld()" />
<br /><input id="Button2" type="button" value="button" onclick="goodbyeWorld()" />
</div>
James