473,397 Members | 1,950 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,397 software developers and data experts.

How to use Asychronous calls

Hi all

i have a requirement in my application where in need to call a web service:

1. My client calls my webservice .
2. when i receive a call from my web servcie i need to notify my client that
"Process started".
3. i need to return the Message "Process Started " and in the background i
need to continue the work which the WebService method is intended to do .
4. once i complete the work in the webservice , i need to send a reault back
to my client.

Client -->WS -->Replies a messages to client (Process started)

WS->completes the work and sends a Result --->Client.

must i use asychronus calls ?
must i use multi threading ?
How can i do this ?

Thanks
Senthil


May 15 '06 #1
1 1167
your first two questions are pretty well identical, and since you want to
start the processing and allow the client to continue work, then yes you have
to use an asynchronous call which means you have to thread it.

since it's an async call, you can take a hint from the async calls built
into the .NET framework in taht they all take a "callback delegate" of some
sort.

Basically you'll make a call to your service with a delegate to the method
in your client that you want to be called when the service is complete.

Service.start(parameter, delegate);

service.start(parameter, delegate) {
// spawn thread to do work
}

service.thread(parameter, delegate) {
// Do your work
// Invoke the delegate
}

should do the trick
--
KMG Software, Inc.
Thinking Beyond, Above, and Before
http://www.kmgsoftware.com
"SenthilVel" wrote:
Hi all

i have a requirement in my application where in need to call a web service:

1. My client calls my webservice .
2. when i receive a call from my web servcie i need to notify my client that
"Process started".
3. i need to return the Message "Process Started " and in the background i
need to continue the work which the WebService method is intended to do .
4. once i complete the work in the webservice , i need to send a reault back
to my client.

Client -->WS -->Replies a messages to client (Process started)

WS->completes the work and sends a Result --->Client.

must i use asychronus calls ?
must i use multi threading ?
How can i do this ?

Thanks
Senthil


May 15 '06 #2

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

Similar topics

5
by: markus | last post by:
Hi, I have a question that deals with the standard c library VS (Unix) system calls. The question is: which header files (and functions) are part of the C library and which header files (and...
6
by: A.M-SG | last post by:
Hi, We are developing a SmartClient application and we are planning to expose business objects layer to SmartClient application by using ASP.NET SOAP web services.
10
by: Brian Parker | last post by:
I inherited a C++ DLL that I need to remotely call multiple times asynchronously. What I have developed is: CSharp web application that makes asynchronous calls to a CSharp Web Service. The...
4
by: archana | last post by:
Hi all, I am having one confusion regarding invoking web method of web service asychronously through windows applicaiton. What i am doing is i am having one long runing web method whose one...
6
by: Dasn | last post by:
Hi, there. 'lines' is a large list of strings each of which is seperated by '\t' I wanna split each string into a list. For speed, using map() instead of 'for' loop. 'map(str.split, lines)'...
2
by: William Johnston | last post by:
Hello, I need to perform synchronous calls to a DllImport function that is asychronous. (The Dllmport function returns immediately.) So far I have a timer that waits inside a ThreadPool queue....
21
by: omkar pangarkar | last post by:
Hi all, I have two simple hello world programs one using printf() and other using write() --prog 1-- #include<stdio.h> #include<stdlib.h> int main() { printf("Hello"); /* up to here...
0
by: spearlselvam | last post by:
Hi all, I have created a chat appln using asychronous socket.. can anyone say the diff of using the below code snippet 1. SetControlProperty(conStatus, "Text", receivedData); ...
1
by: =?Utf-8?B?TWFyaw==?= | last post by:
Hi... There are a few questions wrapped up in this, but the main one is that the WebService.MyMethodAsync() methods that are automatically generated in the client code by VS 2005 don't seem to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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.