Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
What is one way operation
What is one way operation?
✍: Guest
IsOneWay equal to true ensures that the client does not have to wait for the response. So
methods marked by IsOneWay to true should always return void. In this the caller does not get anything in return so it is called as one-way communication.
In order to understand one way implementation in WCF lets make a code walkthrough of
a sample.
Figure 15.18: - One way in action
Above is the code snippet which describes practically how one way works in WCF. The
above given code snippet is numbered. Below is the explanation according to the numbers
marked in figure:
1 - This is the code snippet of the server service. We have created a method called as
doHugeTask. doHugeTask basically makes the method sleep for 5000 MS and then displays
the time when the task is completed.
2 - This code snippet is for client. It creates a proxy object of serviceIsOneWay and calls
the doHugeTask method. After calling the doHugeTask the client execution continues
ahead. So as a proof we display the time when the method calling was completed.
3 - This screen shot shows the output given by both server and client. The top window
displays the server output and the below windows displays the client output.
So run the server program first i.e. ServiceIsOneWay and run the client later. You will see
the client runs the doHugeTask and moves ahead. So the client completion time is less
than the server. One more thing to understand is that one way does not give any notification
back of completion. So it’s like fire and forget.
2007-11-04, 5276👍, 0💬
Popular Posts:
How To Create an Array in PL/SQL? - Oracle DBA FAQ - Introduction to PL/SQL If you want create an ar...
What Are the Parameter Modes Supported by PL/SQL? - Oracle DBA FAQ - Creating Your Own PL/SQL Proced...
Can JavaScript steal text from your clipboard? It is true, text you last copied for pasting (copy &a...
What is ISO? ISO 9000 is a family of standards for quality management systems. ISO 9000 is maintaine...
How To Delete a User Account? - Oracle DBA FAQ - Managing Oracle User Accounts, Schema and Privilege...