By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,559 Members | 1,180 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,559 IT Pros & Developers. It's quick & easy.

How to use Asychronous calls

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.