假设我的web服务位于http://localhost:8080/foo/mywebservice, WSDL位于http://localhost:8080/foo/mywebservice?wsdl。

http://localhost:8080/foo/mywebservice是否是端点,即,它是否与我的web服务的URI相同,或者SOAP消息在接收和解组的地方相同?

你能给我解释一下它是什么,它的目的是什么吗?


当前回答

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.

其他回答

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.

端点是web服务的URL。端点也是一个分布式API。

简单对象访问协议端点是一个URL。它标识了内置HTTP服务上web服务侦听器侦听传入请求的位置。

参考:https://www.ibm.com/support/knowledgecenter/SSSHYH_7.1.0.4/com.ibm.netcoolimpact.doc/dsa/imdsa_web_netcool_impact_soap_endpoint_c.html

这是一个更简短、更清晰的答案…… 是的,端点是客户端应用程序可以访问您的服务的URL。相同的web服务可以有多个端点,例如,为了使用不同的协议使其可用。

更新的答案,来自Peter的评论:

这是“旧术语”,直接使用wsdl“端点” 定义(WSDL2将“端口”转换为“端点”)。


也许您可以在本文档中找到答案: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.

web服务端点是另一个程序用来与您的程序通信的URL。要查看将? WSDL添加到web服务端点URL的WSDL。

Web服务用于程序到程序的交互,而网页用于程序到人的交互。

所以: 端点为:http://www.blah.com/myproject/webservice/webmethod

因此, WSDL是:http://www.blah.com/myproject/webservice/webmethod?wsdl


为了进一步扩展WSDL的元素,我总是发现将它们与代码进行比较是有帮助的:

WSDL有两个部分(物理的和抽象的)。

物理部分:

定义-变量-例如:myVar, x, y等。

类型-数据类型- ex: int, double, String, myObjectType

操作-方法/函数-例如:myMethod(), myFunction()等。

消息——方法/函数的输入参数和返回类型

myMethod(String myVar)

端口类型-类(即它们是操作的容器)-例如:MyClass{},等等。

摘要部分:

绑定——这些连接到端口类型,并定义与此web服务通信所选择的协议。 协议是一种通信形式(文本/短信、电话、电子邮件等)。

Service——它列出了另一个程序可以找到您的web服务(即您的端点)的地址。