Phill Duffy
Phill Duffy

Reputation: 2866

Getting a WCF Progess Update

I am calling a WCF Service using AJAX.NET and wanted to know if the following is possible.

e.g at the moment I have something like the following

AJAX.NET call in Page..

ITeaMaker.MakeCupOfTea(onMakeCupOfTeaSuccess, onMakeCupOfTeaError);

WCF..

public Tea MakeCupOfTea()
{
   FillKettle();
   BoilKettle();
   PutInTeaBag();
   PourWater();
   ...
}

The Web Service makes the call and I do not get a result until all of MakeCupOfTea has succeeded (or failed), is it possible that without requiring me to call the WCF Service for each method inside of MakeCupOfTea individually, that I can in my UI get a report back for each stage? I am not using an UpdatePanel.

i.e

Filling Kettle....Filled

Boiling Kettle....Boiled

Putting in Tea Bag....Done

etc...

Thanks

Upvotes: 1

Views: 79

Answers (1)

Tanner
Tanner

Reputation: 22753

I've never used it myself but you may want to try a WCF Duplex Service that will allow both the client and server to send messages to each other. Hopefully that will allow you to perform the operations you're attempting.

Upvotes: 2

Related Questions