2

I know, I know, but before you vote to close because this 3-year-old question is the same: neither its answers, nor any of the dozens of other answers I've read and reread across the wide wide web, really define the term, at least not in a way that would earn a respectable grade on a language exam administered in a human-language class. (Technical writers appear to have a whole different idea of what "is" is.)

All due respect, consider the most-upvoted answer in that thread, which begins

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

Okay, that's how it's utilized and what its attributes are. What is it? It's an address, a binding, and a contract, easy as A-B-C! Any good student knows a "Binding" is just an(other) abstruse term for a communication mechanism, and a "Contract" is actually part of the service itself. So an endpoint must be defined by the "Address"!

The URL by which the endpoint can be reached.

Um... then how about the canonical Lowy answer, also cited in that thread. An excerpt of the part that doesn't repeat the above:

The endpoint is the fusion of the address, contract, and binding. Every endpoint must have all three elements, and the host exposes the endpoint.

That's like saying a duck is the fusion of walking like a duck, quacking like a duck, and looking like a duck, and the animal kingdom exposes the duck.

All snark aside, this is not idle gadfly curiosity: it is very hard to master a concept whose explanations fail to explain it. So, what is an endpoint in WCF?

Community
  • 1
  • 1
downwitch
  • 1,362
  • 3
  • 19
  • 40

3 Answers3

4

An endpoint is really is an aggregation of these things, it's not an entity or concept that exists in its own right as such.

To extend your duck analogy, it's more like trying to define the quack itself - a quack is the aggregation of air moving over the duck's vocal cords, travelling through space and being interpretted by your brain. There is no "quack" you can point at and define separately outside of those terms.

An endpoint represents something that an external client call to ask your service to do something and (optionally) get some answer or data returned. As Ladislav says it's an "entry point to service functionality".

In order to define what a client can call upon you to do you need a contract (interface definition). To define how the client should send the data and receive the answer you need a binding. To define where the request must be sent you define the address.

If you don't define one of those you don't have an endpoint.

We simply say an "endpoint is exposed" as shorthand for "the service defines contract "C", with binding "B" at address "A" (the ABC's) ", that's all there is to it.

KG Sosa
  • 70
  • 9
Paolo
  • 22,188
  • 6
  • 42
  • 49
  • This is the clearest answer I've read anywhere, thanks. Will accept it unless a clearer one comes along ;) – downwitch May 03 '12 at 12:50
  • One thing further, RE: "exposure". The endpoint is "there" whether it's enumerated or not, no? Isn't that how dynamic endpoints in 4.0 work? I can't see how a WCF service is created *without* endpoints, is my point. – downwitch May 03 '12 at 14:26
3

Endpoint is physical interface (boundary) for your service which has three main properties

  • Address which you must use to reach the service
  • Binding = set of configurations you must follow to be able to communicate with the service
  • Contract = set of operations which you can call on the service

Service can have multiple endpoints with different ABC.

Btw. it is not WCF term. WCF brought this term from WSDL.

Ladislav Mrnka
  • 360,892
  • 59
  • 660
  • 670
  • Mostly another restatement of its properties, but at least "physical interface" is an improvement. If it is a boundary, it must be *between* two things. What two things does it separate or delineate? (I know it's not a WCF term, but I am asking in WCF terms.) – downwitch May 03 '12 at 12:30
  • It separates the service implementation and clients - you can also imagine endpoint as entry point to service functionality. – Ladislav Mrnka May 03 '12 at 12:43
  • "entry point to service functionality" is pretty good, though it sounds a little like address again. I think this is part of what's so confusing about the way this is always described--it's not clear if you're talking about the "entry point" itself, or the map to that point. – downwitch May 03 '12 at 12:54
0

Endpoint usually is the contract the service are using - the interface it are using.

marko
  • 10,684
  • 17
  • 71
  • 92