Web Service Description Language WSDL Detailed (1)

zhaozj2021-02-08  246

Why is WSDL? Is there any use of the INTERNET protocol to use, or people see it like this because the benefits of the way are far exceeded the price? There have been many standards that try to build. Sometimes, those standards that have not been universally used are even forced by the decree or government regulations: ADA language is an example.

I believe it is the benefits that follow the standards to make it widely accepted. For example, for railway services, it is truly important that the railway paved by different companies is combined together, or works from several companies' products coordinated. Several large companies have established SOAP standards. Web Service Description Language (WSDL) has introduced a convenient coordination method to this web service provider and user, making us more advantageous benefits of SOAP. Several companies' railways are nothing hard together, they need to follow the standard distance between the two tracks. For Web Service, this is much more complicated. We must first develop the standard format of the designated interface.

Once some people say that SOAP does not really need an interface description language. If SOAP is a standard for communicating pure content, it needs a language to describe content. The SOAP message does have some type of information, so the SOAP allows the dynamic determination type. But don't know the function name, number of parameters and the type of parameters, how can this function? Without WSDL, I can determine the calling syntax from the essential document, or check the message. Where is the method of casual, it must be involved, and this process may be wrong. And using WSDL, I can automate the Web Service agent through this cross-platform and cross-language approach. Just like com and corba IDL files, the WSDL file is agreed by the customer and server.

Note Because WSDL is designed to be bind other protocols other than SOAP, we focus on WSDL relationships on HTTP and SOAP. Similarly, since SOAP is currently mainly used to call remote processes and functions, WSDL supports document specifications for SOAP transmission. WSDL 1.1 has been submitted to W3C as a record (see http://www.w3.org/tr/wsdl.html)

WSDL document structure

To understand the XML document, it is useful to see the block chart. The following figure illustrates the structure of the WSDL in the form of XML, revealing the relationship between the five colors of the WSDL document.

The WSDL document can be divided into two parts. The top portion consists of an abstract definition, and the bottom portion consists of a specific description. The abstract part defines SOAP messages independently of platform and language, which does not contain any elements that varies with machines or languages. This defines a series of services, and the very different websites can be implemented. Those who have different sites are in the bottom part as serialization, as it contains specific definitions.

l Abstract definition

Types

Independent and machine type definition

Messages

Includes function parameters (input and output separation) or document description

Porttypes

Reference message definition in the message section describe the function signature (operand, input parameters, output parameters)

2 specific definition

Bindings

Each operation of the PortType section is implemented here

Services

Determine each binding port address

In the following figures, arrow connectors represent the relationship between different columns of documents. Points and arrows represent references or use relationships. The double arrow represents the "modification" relationship. The arrows of 3-D represent the associated relationship. In this way, each Messages column uses the definition of the Types column, the PORTTYPES column uses the definition of the Messages column; the Bindings column references the PortTypes column, the Services column references the Bindings column, the PortTypes and Bindings columns contains the Operation element, and the Services column contains Port elements. The Operation element in the PortTypes column is further modified or described by the Operation element in the Bindings column. In this background, I will use standard XML terms to describe WSDL documents. ELEMENT refers to an element of XML and an "Attribute" means an elementality. then:

Contents

The content may also consist of one or more elements in a recursive manner. The root element is the most advanced element in all elements. The child element always belongs to another element, the parent element. Note that there may be only one Types column in the document, or not. All other columns can only have zero elements, single elements, or multi-elements. WSDL's list requires all columns to appear in fixed order: Import, Types, Message, PortType, Binding, Service. All abstractions can be existing in other files individually, or import them from the main document.

Figure 1: Abstract definition and specific definition

转载请注明原文地址:https://www.9cbs.com/read-1982.html

New Post(0)