< binding>和有什么区别?和< portType>在WSDL中? [英] What's the difference between <binding> and <portType> in WSDL?

查看:59
本文介绍了< binding>和有什么区别?和< portType>在WSDL中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<binding><portType>似乎都定义了一个操作及其消息.我不太明白,为什么两者都必要?

解决方案

portType (类似于Java界面)

  • PortType是WSDL的抽象部分.
  • 一个或多个端点支持的一组抽象操作.

绑定

  • 绑定是WSDL的一个具体部分.
  • 描述如何通过为操作和消息指定具体的协议和数据格式规范来调用操作.
  • 绑定是三种类型

    1. SOAP绑定:
      SOAP绑定允许使用encodingliteral documentrpc样式. 编码指示应如何以XML格式编码数据值(这些规则指定如何将某物"编码/序列化为XML,然后再从XML解码/反序列化为XML回到某物") . 文字是指根据模式对数据进行序列化(这只是纯XML数据).传输类型为http,jms,smtp ...

    2. > HTTP GET& POST绑定:
      WSDL包括HTTP 1.1的GET和POST动词的绑定,以描述Web浏览器和网站之间的交互.

    3. MIME绑定: WSDL提供了一种将抽象类型绑定到某些MIME格式的具体消息的方法.


在WSDL 2.0中:

  • 将端口类型重命名为接口
  • 端口已重命名为端点
  • 已删除的消息结构

Source


有用的链接

Both <binding> and <portType> seem to define an operation and its message. I don't quite understand, why are they both necessary?

解决方案

portType (Analogs to Java interface)

  • PortType is an abstraction part of WSDL.
  • An abstract set of operations supported by one or more endpoints.

binding

  • Binding is an concrete part of WSDL.
  • Describes how the operation is invoked by specifying concrete protocol and data format specifications for the operations and messages.
  • bindings are three types

    1. SOAP Binding:
      SOAP binding allows either document or rpc style with either encoding or literal. Encoding indicates how a data value should be encoded in an XML format (These rules specify how "something" is encoded/serialized to XML and then later decoded/de-serialized from XML back to "something"). Literal means that the data is serialized according to a schema (this is just plain XML data). With transportation type http, jms, smtp...

    2. HTTP GET & POST binding:
      WSDL includes a binding for HTTP 1.1's GET and POST verbs in order to describe the interaction between a Web Browser and a web site.

    3. MIME binding: WSDL includes a way to bind abstract types to concrete messages in some MIME format.


In WSDL 2.0 :

  • PortTypes renamed to interfaces
  • Ports renamed to endpoints
  • Removed message constructs

Source


Useful links

这篇关于&lt; binding&gt;和有什么区别?和&lt; portType&gt;在WSDL中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆