What's the difference between and in WSDL?

后端 未结 5 1300
-上瘾入骨i
-上瘾入骨i 2021-01-29 22:25

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

5条回答
  •  梦谈多话
    2021-01-29 22:54

    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

    • WSDL Reading, a Beginner's Guide
    • W3C: Web Services Description Language (WSDL) 1.1
    • W3C: Simple Object Access Protocol (SOAP) 1.1

提交回复
热议问题