Ray's playground

 

Contracts(Essential Windows Communication Foundation)

  WCF heavily leverages SOAP for contract definitions. Specifically, it uses WDSL for describing service endpoints and XSD for describing data.
The service operations defined in WSDL are used to route incoming messages to the correct .NET class at runtime. Similarly, the XML documents
defined by XSD contracts are deserialized into .NET types and passed to the service operations at runtime. Together, the WSDL and XSD definitions provide a standards-based representation of the .NET types used within a service implementation.
  Three types of contracts were defined in detail:
  • Service contracts. Service contracts describe the functional operations implemented by the service.
  • Data contracts. Data contracts describe the data structures through which the service communicates. A data contract serializes CLR types to XML and is strictly opt-in with their data members.
  • Message contracts. Message contracts work with typed and untyped data and provide precise control over the SOAP headers and bodies.

posted on 2010-03-30 13:18  Ray Z  阅读(231)  评论(0编辑  收藏  举报

导航