dotnet web services:
Hi,
I have to make multiple calls (about 400K) to a webservice which returns a
string. And currently it takes about a week to make all the calls. Instead of
waiting for the webservice result before i make the next call, I rather want
to make the calls and let the results comeback at its own pace. I used
Asynchronous calling and callback method, but it does not seems to work. I am
sure, asynchronous way will improve my program execution exponentially. I
would appreciate if someone can help me with this. And by the way, i did not
see an Begin and End methods.
Here is my method which is making the webservice calls.
public static Boolean WebServiceCallsXY(string x, string y)
{
try
{
UsernameToken token = new UsernameToken("AAA", "BBB",
PasswordOption.SendPlainText);
MbrSrvWse wseProxy = new MbrSrvWse ();
wseProxy.SetClientCredential<UsernameToken>(token);
wseProxy.SetPolicy("ProvideUsernameToken");
IndividualDetailRequest test = new IndividualDetailRequest();
test.UserId = x;
test.Pin = y;
IndividualDetailResponse response =
wseProxy.IndividualDetail(test);
if (response.Result.Length > 0)
{
if (response.Result.ToString().ToLower().Equals("a"))
{
return true;
}
if (response.Result.ToString().ToLower().Equals("b"))
{
return false;
}
}
return false;
}
catch (Exception e)
{
Console.WriteLine("The following error '{0}' -------- {1} :
{2} ", e.Message, e.StackTrace, x);
return false;
}
}
--