What is an “endpoint” in WCF?

后端 未结 7 614
抹茶落季
抹茶落季 2021-01-30 08:49

I was under the impression that an endpoint was defined in a config file as the list of possible clients but that makes no sense (in the sense that I assumed it said what comput

7条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-30 08:57

    An endpoint is what a service exposes, and in WCF terms, is made up of three things:

    • Address
    • Binding
    • Contract

    Address is the URL by which the endpoint can be reached.

    Binding dictates transformations that are applied as well as the shape (to some degree) of the messages sent to the implementation of the Contract at the Address.

    Contract dictates what operations are being exposed at the address. It's exactly what it says it is, it's a contract to indicate what calls are permissible.

    Most of the time, people remember it as A B C.

    Some things to note:

    The binding is typically going to be a combination of channels with behaviors applied; channels being elements on the channel stack which modify the message and perform actions before they get to the service implementation.

    While commonly represented by an interface in .NET, it is not a requirement that a Contract be represented in this manner. Some design-first advocates will define the schemas to the messages that are going to be sent for the request and the response first, which is what WCF transforms the .NET Contract interface into.

提交回复
热议问题