Click here to Skip to main content
15,888,301 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All

I just want to know why to use one way and two way in webService.

I just want a sample too.







Regards
Froxy
Posted

1 solution

One Way

When you want your Client application should not wait untill your Web Service completes the execution then you may use "One Way" by defining OneWay=true property of SoapDocumentMethod Attribute.

Have a look at below link
http://msdn.microsoft.com/en-us/library/system.web.services.protocols.soapdocumentmethodattribute.oneway.aspx

In this return type of your WebMethod has to be void.

Two Way
This term can be taken in two ways.

1) Web Service returning something back to client.
http://netpl.blogspot.com/2009/07/aspnet-webservices-two-way-response-and.html

2) Service is calling back Client.
For Traditional Web Service you may refer below link.
Duplex Web Services

For WCF Duplex refer this link.
http://geekswithblogs.net/claeyskurt/archive/2007/09/05/115169.aspx
 
Share this answer
 
Comments
Anuja Pawar Indore 10-Nov-11 7:59am    
My 5.... Good one
RaisKazi 10-Nov-11 8:20am    
Thank you Anuja.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900