473,398 Members | 2,427 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Can a Web Service send it's status to a client?

Hi,
I have a web service which is doing a lot of processing and taking 4-5
minutes to do so. The processing is split into several discrete steps and I
would like for the service to be able to tell the client when it is done
with each step.
I have tried to do this in a couple of ways and neither have worked. Any
ideas how I might get it to work?

What I have tried was:

1) Splitting out each processing step into a different web method and then
having the client call each method as the one before it finished.
The sort of work, in that the client knew what was happening when,
but the I could not get the service to remember the intermediate results and
thus it did everything after the first step on null objects. I thought of
passing the results back to the client and then having it pass them back to
the service, but there is too much data in the intermediate results for that
to be reasonable.

2) Having the WebService class have a private status string and a public
WebMethod GetStatus which returns that string. The service then updates the
string as appropriate and the client asks for it periodically.
The value of the status string never actually changed. I wrote code
(C#):
status = "Starting Blast analysis.";
BlastSolutionSet thisSolution =
DatabaseAccess.GetExperiment(experimentGuid);
thisSolution.BlastAll();
status = "Collating Blast Data";
thisSolution.AssignBlastResults();
status = "Querying NCBI";
thisSolution.CollectNcbiData();
status = "Done";
In debug mode, the value of status was always "".
Ay thoughts?
Thanks!
Ethan
Jan 29 '07 #1
2 1576
Ethan,

To answer your first question, you need to use asynchronous websevices.
For such long running web-services asynchronous webservices is the
recommended approach. You can have a call-back delegate to notify the client.

Please refer the following url for further details

http://www.codeproject.com/cs/webservices/wsasync.asp
http://msdn.microsoft.com/msdnmag/is...10/WickedCode/

To answer your second question, i think the code execution is not reaching
the path where the variable 'status' is getting populated
--
Thanks & Regards,
Mark Nelson
"Ethan Strauss" wrote:
Hi,
I have a web service which is doing a lot of processing and taking 4-5
minutes to do so. The processing is split into several discrete steps and I
would like for the service to be able to tell the client when it is done
with each step.
I have tried to do this in a couple of ways and neither have worked. Any
ideas how I might get it to work?

What I have tried was:

1) Splitting out each processing step into a different web method and then
having the client call each method as the one before it finished.
The sort of work, in that the client knew what was happening when,
but the I could not get the service to remember the intermediate results and
thus it did everything after the first step on null objects. I thought of
passing the results back to the client and then having it pass them back to
the service, but there is too much data in the intermediate results for that
to be reasonable.

2) Having the WebService class have a private status string and a public
WebMethod GetStatus which returns that string. The service then updates the
string as appropriate and the client asks for it periodically.
The value of the status string never actually changed. I wrote code
(C#):
status = "Starting Blast analysis.";
BlastSolutionSet thisSolution =
DatabaseAccess.GetExperiment(experimentGuid);
thisSolution.BlastAll();
status = "Collating Blast Data";
thisSolution.AssignBlastResults();
status = "Querying NCBI";
thisSolution.CollectNcbiData();
status = "Done";
In debug mode, the value of status was always "".
Ay thoughts?
Thanks!
Ethan
Jan 30 '07 #2
Any updates, did you proceed further ?
Please let me know whether my post was useful.

--
Thanks & Regards,
Mark Nelson
"Mark Nelson" wrote:
Ethan,

To answer your first question, you need to use asynchronous websevices.
For such long running web-services asynchronous webservices is the
recommended approach. You can have a call-back delegate to notify the client.

Please refer the following url for further details

http://www.codeproject.com/cs/webservices/wsasync.asp
http://msdn.microsoft.com/msdnmag/is...10/WickedCode/

To answer your second question, i think the code execution is not reaching
the path where the variable 'status' is getting populated
--
Thanks & Regards,
Mark Nelson
"Ethan Strauss" wrote:
Hi,
I have a web service which is doing a lot of processing and taking 4-5
minutes to do so. The processing is split into several discrete steps and I
would like for the service to be able to tell the client when it is done
with each step.
I have tried to do this in a couple of ways and neither have worked. Any
ideas how I might get it to work?

What I have tried was:

1) Splitting out each processing step into a different web method and then
having the client call each method as the one before it finished.
The sort of work, in that the client knew what was happening when,
but the I could not get the service to remember the intermediate results and
thus it did everything after the first step on null objects. I thought of
passing the results back to the client and then having it pass them back to
the service, but there is too much data in the intermediate results for that
to be reasonable.

2) Having the WebService class have a private status string and a public
WebMethod GetStatus which returns that string. The service then updates the
string as appropriate and the client asks for it periodically.
The value of the status string never actually changed. I wrote code
(C#):
status = "Starting Blast analysis.";
BlastSolutionSet thisSolution =
DatabaseAccess.GetExperiment(experimentGuid);
thisSolution.BlastAll();
status = "Collating Blast Data";
thisSolution.AssignBlastResults();
status = "Querying NCBI";
thisSolution.CollectNcbiData();
status = "Done";
In debug mode, the value of status was always "".
Ay thoughts?
Thanks!
Ethan

Feb 2 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: BK | last post by:
Can someone point me to a code sample that illustrates executing long running tasks (asynchronous) from a web application in ASP.NET? I assume that Web Services might come into play at some point,...
1
by: Darren McDowell via .NET 247 | last post by:
I have a situation, I was wondering if someone could help me. Wehave a .net web service, it runs several transactions in sqlserver 2000. We have several clients which connect to this webservice in...
0
by: DT | last post by:
I'm writing a .NET 1.1 client that invokes a method of a Web Service running on another organization's IIS 5 server. I need help understanding a fine point about HTTP, specifically in relation to...
2
by: John A | last post by:
I have a Web Service that I am reponsible for that we use for data integration purposes. Recently I have been tasked with sending some of this data to a third party. Because they need to receive...
4
by: WinDev | last post by:
We are trying to build a system where we have a Windows Service do some manipulation of data, and then sending the data to a Windows App. I had posted a question of how we should do this and was...
0
by: vul | last post by:
I developed Windows Service which is running on Windows 2003 server. It connects to MS Fax service and listens its events. When Fax Job changes its status, my service catches that event and updates...
0
by: Nilesh | last post by:
I am developing smart client application which uses web service to retrieve data from HO. The Web Service will get the data from HO database, mark it with status "With PDA" and send the data to the...
1
by: =?Utf-8?B?VzFsZDBuZTc0?= | last post by:
I need to create a Windows Service, which will be hosting a couple of worker classes, each in there own thread. I will be creating a tray Icon (Notify Icon) and a windows form to manage this...
0
by: vpal61 | last post by:
Hello, I have an Excel/VBA web service client with SOAP Toolkit, consuming Apache Tomcat webservice, which is working fine. Now I am trying to migrate to .NET, and build client in VS2005 with...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.