marți, 6 octombrie 2009


Web services are based on the notion of a service and transfer the data in messages.
-> a class : System.Web.Services.WebService
contains the method to be exposed with the [WebMethod] attribute over it

public class Employee : WebService
public DataSet GetCutomer(int CustomerID)

the transport protocol is mainly HTTP, though it can be SMTP or TCP as well
is the preferred and default message protocol
-> use XML serialization

-An ASMX page contains a complete set of information that describes how the data will be formatted, how to wrap the data in a SOAP header, and how to prepare it to be sent
-ASMX is the tight coupling with the HTTP runtime and the dependence on IIS to host it
-ASMX service is instantiated on a per-call basis, while WCF gives you flexibility by providing various instancing options such as Singleton, private session, per call

Niciun comentariu:

Trimiteți un comentariu