472,127 Members | 1,845 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,127 software developers and data experts.

Asynchronous calling problem in Web service.

jim
Hi All,

I try to make an asynchronous call to a web service method as below under MS
visual .NET studio 2003:

WebService webSrv = new WebService();
AsyncCallback cb = new AsyncCallback(TrsWebSvsCallback);
IAsyncResult ar = webSrv.BeginProcessCall( 1, cb, transWeb40);

while (ar.IsCompleted == false)
{
....
}

..
..
..

public static void TrsWebSvsCallback(IAsyncResult ar)
{
WebService webSrv = (WebService) ar.AsyncState;
string strResponse = webSrv.EndProcessCall( ar );
}

But in while statement, ar.IsCompleted is always false.

In the debug environment of Visual .NET Studio 2003, the callBack thread was
created. But it seems stoped at location:
System.Web.Services.UnsafeNativeMethods.OnSyncCall Return.

It never invoke the TrsWebSvsCallback method. And also ar.IsCompleted never
be set to 'true'.

Anybody have idea on this would be appreciated.

Thanks in advance,
Jim

Nov 23 '05 #1
4 2250

Sounds like your getting closer to the problem that is being reported in
several current threads on this subject.

Also, have you tried launching multiple callbacks ( in a loop ) ?

Question: does the call to the web service appear in your iis server logs?

jim wrote:
Hi All,

I try to make an asynchronous call to a web service method as below under
MS visual .NET studio 2003:

WebService webSrv = new WebService();
AsyncCallback cb = new AsyncCallback(TrsWebSvsCallback);
IAsyncResult ar = webSrv.BeginProcessCall( 1, cb, transWeb40);

while (ar.IsCompleted == false)
{
...
}

.
.
.

public static void TrsWebSvsCallback(IAsyncResult ar)
{
WebService webSrv = (WebService) ar.AsyncState;
string strResponse = webSrv.EndProcessCall( ar );
}

But in while statement, ar.IsCompleted is always false.

In the debug environment of Visual .NET Studio 2003, the callBack thread
was created. But it seems stoped at location:
System.Web.Services.UnsafeNativeMethods.OnSyncCall Return.

It never invoke the TrsWebSvsCallback method. And also ar.IsCompleted
never be set to 'true'.

Anybody have idea on this would be appreciated.

Thanks in advance,
Jim


--
Texeme Textcasting Technology
http://www.texeme.com
Nov 23 '05 #2

Sounds like your getting closer to the problem that is being reported in
several current threads on this subject.

Also, have you tried launching multiple callbacks ( in a loop ) ?

Question: does the call to the web service appear in your iis server logs?

jim wrote:
Hi All,

I try to make an asynchronous call to a web service method as below under
MS visual .NET studio 2003:

WebService webSrv = new WebService();
AsyncCallback cb = new AsyncCallback(TrsWebSvsCallback);
IAsyncResult ar = webSrv.BeginProcessCall( 1, cb, transWeb40);

while (ar.IsCompleted == false)
{
...
}

.
.
.

public static void TrsWebSvsCallback(IAsyncResult ar)
{
WebService webSrv = (WebService) ar.AsyncState;
string strResponse = webSrv.EndProcessCall( ar );
}

But in while statement, ar.IsCompleted is always false.

In the debug environment of Visual .NET Studio 2003, the callBack thread
was created. But it seems stoped at location:
System.Web.Services.UnsafeNativeMethods.OnSyncCall Return.

It never invoke the TrsWebSvsCallback method. And also ar.IsCompleted
never be set to 'true'.

Anybody have idea on this would be appreciated.

Thanks in advance,
Jim


--
Texeme Textcasting Technology
http://www.texeme.com
Nov 23 '05 #3
jim
Yes, after calling BeginProcessCall( 1, cb, transWeb40), the ProcessCall web
method was called. When it finished and returned successfully, ar.IsCompleted
still was kept 'false' and Callback function never be called.

Thanks,
Jim
"John Bailo" wrote:

Sounds like your getting closer to the problem that is being reported in
several current threads on this subject.

Also, have you tried launching multiple callbacks ( in a loop ) ?

Question: does the call to the web service appear in your iis server logs?

jim wrote:
Hi All,

I try to make an asynchronous call to a web service method as below under
MS visual .NET studio 2003:

WebService webSrv = new WebService();
AsyncCallback cb = new AsyncCallback(TrsWebSvsCallback);
IAsyncResult ar = webSrv.BeginProcessCall( 1, cb, transWeb40);

while (ar.IsCompleted == false)
{
...
}

.
.
.

public static void TrsWebSvsCallback(IAsyncResult ar)
{
WebService webSrv = (WebService) ar.AsyncState;
string strResponse = webSrv.EndProcessCall( ar );
}

But in while statement, ar.IsCompleted is always false.

In the debug environment of Visual .NET Studio 2003, the callBack thread
was created. But it seems stoped at location:
System.Web.Services.UnsafeNativeMethods.OnSyncCall Return.

It never invoke the TrsWebSvsCallback method. And also ar.IsCompleted
never be set to 'true'.

Anybody have idea on this would be appreciated.

Thanks in advance,
Jim


--
Texeme Textcasting Technology
http://www.texeme.com

Nov 23 '05 #4
jim
Yes, after calling BeginProcessCall( 1, cb, transWeb40), the ProcessCall web
method was called. When it finished and returned successfully, ar.IsCompleted
still was kept 'false' and Callback function never be called.

Thanks,
Jim
"John Bailo" wrote:

Sounds like your getting closer to the problem that is being reported in
several current threads on this subject.

Also, have you tried launching multiple callbacks ( in a loop ) ?

Question: does the call to the web service appear in your iis server logs?

jim wrote:
Hi All,

I try to make an asynchronous call to a web service method as below under
MS visual .NET studio 2003:

WebService webSrv = new WebService();
AsyncCallback cb = new AsyncCallback(TrsWebSvsCallback);
IAsyncResult ar = webSrv.BeginProcessCall( 1, cb, transWeb40);

while (ar.IsCompleted == false)
{
...
}

.
.
.

public static void TrsWebSvsCallback(IAsyncResult ar)
{
WebService webSrv = (WebService) ar.AsyncState;
string strResponse = webSrv.EndProcessCall( ar );
}

But in while statement, ar.IsCompleted is always false.

In the debug environment of Visual .NET Studio 2003, the callBack thread
was created. But it seems stoped at location:
System.Web.Services.UnsafeNativeMethods.OnSyncCall Return.

It never invoke the TrsWebSvsCallback method. And also ar.IsCompleted
never be set to 'true'.

Anybody have idea on this would be appreciated.

Thanks in advance,
Jim


--
Texeme Textcasting Technology
http://www.texeme.com

Nov 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Marty McDonald | last post: by
2 posts views Thread by Chris | last post: by
1 post views Thread by Alexander Kaplunov | last post: by
reply views Thread by Morten Wennevik | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.