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 WebServiceCalls XY(string x, string y)
{
try
{
UsernameToken token = new UsernameToken(" AAA", "BBB",
PasswordOption. SendPlainText);
MbrSrvWse wseProxy = new MbrSrvWse ();
wseProxy.SetCli entCredential<U sernameToken>(t oken);
wseProxy.SetPol icy("ProvideUse rnameToken");
IndividualDetai lRequest test = new IndividualDetai lRequest();
test.UserId = x;
test.Pin = y;
IndividualDetai lResponse response =
wseProxy.Indivi dualDetail(test );
if (response.Resul t.Length 0)
{
if (response.Resul t.ToString().To Lower().Equals( "a"))
{
return true;
}
if (response.Resul t.ToString().To Lower().Equals( "b"))
{
return false;
}
}
return false;
}
catch (Exception e)
{
Console.WriteLi ne("The following error '{0}' -------- {1} :
{2} ", e.Message, e.StackTrace, x);
return false;
}
}
--
Kalyan
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 WebServiceCalls XY(string x, string y)
{
try
{
UsernameToken token = new UsernameToken(" AAA", "BBB",
PasswordOption. SendPlainText);
MbrSrvWse wseProxy = new MbrSrvWse ();
wseProxy.SetCli entCredential<U sernameToken>(t oken);
wseProxy.SetPol icy("ProvideUse rnameToken");
IndividualDetai lRequest test = new IndividualDetai lRequest();
test.UserId = x;
test.Pin = y;
IndividualDetai lResponse response =
wseProxy.Indivi dualDetail(test );
if (response.Resul t.Length 0)
{
if (response.Resul t.ToString().To Lower().Equals( "a"))
{
return true;
}
if (response.Resul t.ToString().To Lower().Equals( "b"))
{
return false;
}
}
return false;
}
catch (Exception e)
{
Console.WriteLi ne("The following error '{0}' -------- {1} :
{2} ", e.Message, e.StackTrace, x);
return false;
}
}
--
Kalyan
Comment