473,500 Members | 1,668 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2313

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
4810
by: Marty McDonald | last post by:
I create and start several threads, each thread executes the same method - within the method, a web service is invoked. I find that the more threads I use, the longer it takes for all of the...
0
1544
by: orekinbck | last post by:
Hi There This question is about calling an asynchronous web service from the UI thread. Unless I am making a fundamental error, it appears that the asynchronous web service call seems to spark...
2
1354
by: Chris | last post by:
Hello, With asynchronous programming : Why does the callback-function (running in a worker thread) may not update the state of a control on the main-form ? The docs say that you must use a...
1
9830
by: Alexander Kaplunov | last post by:
I have two different scenarios: 1. I have an application that calls a web service and passes an object. Web Service takes that object and does some stuff with it, which could take...
0
2563
by: Bob Davies | last post by:
Hi I have a webservice that retrieves data from a database, this is then returned to the calling client application built in windows forms within a dataset, however upon attempting to create...
0
1024
by: Dave | last post by:
If I'm making several asynchronous web service calls using the services Begin/End methods. How do you return the results of the webservice back to the main thread or calling page? Here's my...
1
1918
by: kkao77 | last post by:
Someone help me please. I've tried to write an asynchronous method, but it didn't call my web service, do I need to do something in my webservice project to make it work? or if there is...
0
864
by: Morten Wennevik | last post by:
Hi, We have a web page running in the context of a windows user (windows authentication). This page calls several web services, all of which runs in the context of this user. However, when...
7
6303
by: jtbjurstrom | last post by:
Bear with me because we are new to WCF and have been going through documentation and samples trying to absorb as much as possible in a short amount of time. Any suggestions would be much...
0
7134
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7180
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7229
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5485
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3103
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1429
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
311
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.