What is a web service endpoint?

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, ie, 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?


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.


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 : http://www.w3.org/TR/wsdl.html

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.
  • http://www.ehow.com/info_12212371_definition-service-endpoint.html

    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.


    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: http://www.blah.com/myproject/webservice/webmethod

    Therefore, WSDL is: http://www.blah.com/myproject/webservice/webmethod?wsdl


    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 (ie 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 (ie your endpoint ).

    链接地址: http://www.djcxy.com/p/62132.html

    上一篇: 使用CKModifyOperation与CoreData同步的Cloudkit Sync

    下一篇: 什么是Web服务端点?