The endpoint of WCF and its ABC

Source: Internet
Author: User

Address: Where to find services

every service in WCF has a unique address (addressess). The address contains two important elements: a service location and transport protocol, or a transport style for service communication. The service location includes the target machine name, site or network, communication port, pipeline, or queue, and an optional specific path or URI (Uniform Resource identity).


Bind (Binding): How to communicate with a service
A binding encapsulates a collection of related options such as transport protocols, message encodings, communication patterns, reliability, security, transactional propagation, and interoperability, so that they remain consistent.



Contract (Contract): What is the service capable of?
All services for WCF expose contracts (contract). The contract is not related to the platform, it is the standard way of describing service function. WCF defines four types of contracts.

Services contract (service contract)
The service contract describes the service operations that the client can perform.
Data Contract (contract)
A data contract defines the type of data that interacts with the service. WCF implicitly defines a contract for built-in types such as int and string, and we can also easily define custom types as data contracts.
Error contract (Fault contract)
The error contract defines the error that the service ran out, and how the service handled the error and passed the error to the client.
Messaging Contract (Message contract)
The message contract allows the service to interact directly with the message. A message contract can be either typed or untyped. A message contract can be useful if the system requires interoperability, or if it follows an existing message format.



End point (Endpoint)

An endpoint is a mix of addresses, contracts, and bindings. Each endpoint contains three elements, and the host is responsible for exposing the endpoint. Logically, the endpoint corresponds to the interface of the service.


Each service must expose at least one business endpoint, and each endpoint has a tangent that can have only one contract. All endpoints on a service contain unique addresses, and a single service can expose multiple endpoints. These endpoints can use the same or different bindings to expose the same or different contracts. There is absolutely no association between the different endpoints provided by each service.





The endpoint of WCF and its ABC

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.