By karakays

2012-03-21 15:11:11 8 Comments

Let's say my web service is located at http://localhost:8080/foo/mywebservice and my WSDL is at http://localhost:8080/foo/mywebservice?wsdl.

Is http://localhost:8080/foo/mywebservice an endpoint, i.e., is it the same as the URI of my web service or where the SOAP messages received and unmarshalled?

Could you please explain to me what it is and what the purpose of it is?


@Martyn Wynn 2018-10-12 15:42:47

An Endpoint is specified as a relative or absolute url that usually results in a response. That response is usually the result of a server-side process that, could, for instance, produce a JSON string. That string can then be consumed by the application that made the call to the endpoint. So, in general endpoints are predefined access points, used within TCP/IP networks to initiate a process and/or return a response. Endpoints could contain parameters passed within the URL, as key value pairs, multiple key value pairs are separated by an ampersand, allowing the endpoint to call, for example, an update/insert process; so endpoints don’t always need to return a response, but a response is always useful, even if it is just to indicate the success or failure of an operation.

@Satya 2018-10-06 20:22:09

Simply put, an endpoint is one end of a communication channel. When an API interacts with another system, the touch-points of this communication are considered endpoints. For APIs, an endpoint can include a URL of a server or service. Each endpoint is the location from which APIs can access the resources they need to carry out their function.

APIs work using ‘requests’ and ‘responses.’ When an API requests information from a web application or web server, it will receive a response. The place that APIs send requests and where the resource lives, is called an endpoint.


@specialk1st 2016-01-26 12:58:46

A web service endpoint is the URL that another program would use to communicate with your program. To see the WSDL you add ?wsdl to the web service endpoint URL.

Web services are for program-to-program interaction, while web pages are for program-to-human interaction.

So: Endpoint is:

Therefore, WSDL is:

To expand further on the elements of a WSDL, I always find it helpful to compare them to code:

A WSDL has 2 portions (physical & abstract).

Physical Portion:

Definitions - variables - ex: myVar, x, y, etc.

Types - data types - ex: int, double, String, myObjectType

Operations - methods/functions - ex: myMethod(), myFunction(), etc.

Messages - method/function input parameters & return types

  • ex: public myObjectType myMethod(String myVar)

Porttypes - classes (i.e. they are a container for operations) - ex: MyClass{}, etc.

Abstract Portion:

Binding - these connect to the porttypes and define the chosen protocol for communicating with this web service. - a protocol is a form of communication (so text/SMS, vs. phone vs. email, etc.).

Service - this lists the address where another program can find your web service (i.e. your endpoint).

@Minnie Shi 2017-04-03 08:19:38

I found "Web services are for program-to-program interaction, while web pages are for program-to-human interaction" is very useful statement to stop me puzzling "why the hell would not people just call the end point as URL"

@specialk1st 2017-04-09 12:49:03

Glad it helped Minnie Shi! :-)

@Julien 2012-03-21 15:19:32

Updated answer, from Peter in comments :

This is de "old terminology", use directally the WSDL2 "endepoint" definition (WSDL2 translated "port" to "endpoint").

Maybe you find an answer in this document :

A WSDL document defines services as collections of network endpoints, or ports. In WSDL, the abstract definition of endpoints and messages is separated from their concrete network deployment or data format bindings. This allows the reuse of abstract definitions: messages, which are abstract descriptions of the data being exchanged, and port types which are abstract collections of operations. The concrete protocol and data format specifications for a particular port type constitutes a reusable binding. A port is defined by associating a network address with a reusable binding, and a collection of ports define a service. Hence, a WSDL document uses the following elements in the definition of network services:

  • Types– a container for data type definitions using some type system (such as XSD).
  • Message– an abstract, typed definition of the data being communicated.
  • Operation– an abstract description of an action supported by the service.
  • Port Type–an abstract set of operations supported by one or more endpoints.
  • Binding– a concrete protocol and data format specification for a particular port type.
  • Port– a single endpoint defined as a combination of a binding and a network address.
  • Service– a collection of related endpoints.

The endpoint is a connection point where HTML files or active server pages are exposed. Endpoints provide information needed to address a Web service endpoint. The endpoint provides a reference or specification that is used to define a group or family of message addressing properties and give end-to-end message characteristics, such as references for the source and destination of endpoints, and the identity of messages to allow for uniform addressing of "independent" messages. The endpoint can be a PC, PDA, or point-of-sale terminal.

@musaul 2013-10-10 08:44:53

"Endpoints provide information needed to address a Web service endpoint." Gotta love that sentence! :D

@Peter Krauss 2014-07-31 12:01:45

This is de "old terminology", use directally the WSDL2 "endepoint" definition (WSDL2 translated "port" to "endpoint").

@Jose Martinez 2015-01-29 18:40:49

In past projects I worked on, the endpoint was a relative property. That is to say it may or may not have been appended to, but it always contained the protocol://host:port/partOfThePath.

If the service being called had a dynamic part to it, for example a ?param=dynamicValue, then that part would get added to the endpoint. But many times the endpoint could be used as is without having to be amended.

Whats important to understand is what an endpoint is not and how it helps. For example an alternative way to pass the information stored in an endpoint would be to store the different parts of the endpoint in separate properties. For example:


Or if the same host and port across multiple services:


In those cases the full URL would need to be constructed in your code as such:

String url = "http://" + host + ":" + port + pathForServiceA  + "?" + dynamicParam + "=" + dynamicValue;

In contract this can be stored as an endpoint as such


And yes many times we stored the endpoint up to and including the '='. This lead to code like this:

String url = serviceAEndpoint + dynamicValue;

Hope that sheds some light.

@lbalazscs 2013-09-12 15:47:58

This is a shorter and hopefully clearer answer... Yes, the endpoint is the URL where your service can be accessed by a client application. The same web service can have multiple endpoints, for example in order to make it available using different protocols.

@Michael Durrant 2014-02-10 20:31:06

+1 for a simpler answer!

@user137717 2014-11-27 04:41:57

so is each page on my site another endpoint? if i have and are those both end points?

@lbalazscs 2014-11-27 07:23:43

@user137717 No, websites are not web services. A web service is primarily used by applications, while websites are primarily for humans.

@user137717 2014-11-27 13:54:00

@Ibalazscs So an API call on my server or DB is an endpoint?

@lbalazscs 2014-11-27 15:49:59

@user137717 The endpoint is the URL where your web service can be accessed by a client application. If you don't understand what a web service is, read for example this:…

@Withheld 2015-07-28 17:49:49

+1 from me, too, and a question: Why not just call it (i.e. so called "endpoint") a "base URI"? Is there a fundamental difference between an "endpoint" and a "base URI"? Thanks.

@lbalazscs 2015-07-28 21:36:28

@Withheld Conceptually there is a difference between an endpoint and its address, but in practice usually the address is meant, because typically you need to configure a client with an "endpoint" to find the service.

@Tom Russell 2016-12-07 07:44:28

This seems to say that, if you include method names (get, post, etc) and URL parameters items/get/{id}, then the number of endpoints for a service grows linearly with the size of the database table.

@MasterJoe2 2017-07-24 18:24:08

@lbalazscs - IP-Address:8080/foo/ShoppingWebservice/Toys, IP-Address:8080/foo/ShoppingWebservice/Books etc. - What is the /Toys, /Books part called ? Are they also called endpoints or resources ?

Related Questions

Sponsored Content

34 Answered Questions

[SOLVED] What is dependency injection?

31 Answered Questions

[SOLVED] What exactly is RESTful programming?

  • 2009-03-22 14:45:39
  • hasen
  • 1573848 View
  • 3796 Score
  • 31 Answer
  • Tags:   http rest definition

8 Answered Questions

[SOLVED] What is JSONP, and why was it created?

44 Answered Questions

[SOLVED] What is a monad?

21 Answered Questions

[SOLVED] What is reflection and why is it useful?

14 Answered Questions

[SOLVED] What is 'Currying'?

22 Answered Questions

18 Answered Questions

0 Answered Questions

1 Answered Questions

[SOLVED] The service cannot be found for the endpoint reference

Sponsored Content