473,804 Members | 2,070 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(T rsWebSvsCallbac k);
IAsyncResult ar = webSrv.BeginPro cessCall( 1, cb, transWeb40);

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

..
..
..

public static void TrsWebSvsCallba ck(IAsyncResult ar)
{
WebService webSrv = (WebService) ar.AsyncState;
string strResponse = webSrv.EndProce ssCall( 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.Serv ices.UnsafeNati veMethods.OnSyn cCallReturn.

It never invoke the TrsWebSvsCallba ck 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 2332

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(T rsWebSvsCallbac k);
IAsyncResult ar = webSrv.BeginPro cessCall( 1, cb, transWeb40);

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

.
.
.

public static void TrsWebSvsCallba ck(IAsyncResult ar)
{
WebService webSrv = (WebService) ar.AsyncState;
string strResponse = webSrv.EndProce ssCall( 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.Serv ices.UnsafeNati veMethods.OnSyn cCallReturn.

It never invoke the TrsWebSvsCallba ck 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(T rsWebSvsCallbac k);
IAsyncResult ar = webSrv.BeginPro cessCall( 1, cb, transWeb40);

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

.
.
.

public static void TrsWebSvsCallba ck(IAsyncResult ar)
{
WebService webSrv = (WebService) ar.AsyncState;
string strResponse = webSrv.EndProce ssCall( 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.Serv ices.UnsafeNati veMethods.OnSyn cCallReturn.

It never invoke the TrsWebSvsCallba ck 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 BeginProcessCal l( 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(T rsWebSvsCallbac k);
IAsyncResult ar = webSrv.BeginPro cessCall( 1, cb, transWeb40);

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

.
.
.

public static void TrsWebSvsCallba ck(IAsyncResult ar)
{
WebService webSrv = (WebService) ar.AsyncState;
string strResponse = webSrv.EndProce ssCall( 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.Serv ices.UnsafeNati veMethods.OnSyn cCallReturn.

It never invoke the TrsWebSvsCallba ck 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 BeginProcessCal l( 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(T rsWebSvsCallbac k);
IAsyncResult ar = webSrv.BeginPro cessCall( 1, cb, transWeb40);

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

.
.
.

public static void TrsWebSvsCallba ck(IAsyncResult ar)
{
WebService webSrv = (WebService) ar.AsyncState;
string strResponse = webSrv.EndProce ssCall( 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.Serv ices.UnsafeNati veMethods.OnSyn cCallReturn.

It never invoke the TrsWebSvsCallba ck 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
4826
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 threads to finish. The threads are asynchronous, correct? And I thought each would be able to use it's own version of the web service. Am I wrong, does the web service force only one thread at a time to execute? Here is code if interested... I'm...
0
1553
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 off an Application.DoEvents() when system resources are low and the message loop has queued requests. Here are some snippets of code to describe the problem:
2
1378
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 MethodInvoker instead as in following example :
1
9846
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 some time. It seems to me that in this case it would be appropriate to use asynchronous web service. Am I correct?
0
2598
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 tablestyles to format any of the columns within the datagrid, the exception "Can-not parent objects created on one thread to objects created on another" or words to that effect. I'm not too sure if what I said make sense, but i will add details to...
0
1038
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 code, I get the XML in the callback but not sure how to return it since the BeginXXX expects a IAsynchResult? IAsyncResult ar = <proxy>.BeginXXXX(params, new AsyncCallback(SomeAsynchCallback), <proxy>); .....
1
1930
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 something wrong with the code that I have below. Thanks.. The following are my two methods where one is calling web service and
0
878
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 calling a service asynchronously (using BeginMethod) the context appears to be running under the application pool user. Google has not been very helpful so far. Is it possible to preserve the context in asynchronous web service calls? If so, how?
7
6317
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 appreciated. We would of course rather start off on the right path instead of learning later that there's a much better and easier solution, but get stuck with our original implementation. We are working on designing a client server solution using WCF...
0
9711
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10595
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10343
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10335
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9169
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6862
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5529
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4306
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 we have to send another system
2
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.