您的位置:首页 > 其它

Contracts(Essential Windows Communication Foundation)

2010-03-30 13:18 465 查看
  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 documentsdefined 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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: