Web Service Description Language WSDL (1)--Why use wsdl?[to turn]

Source: Internet
Author: User
Tags abstract abstract definition soap requires wsdl
Web| is it possible that standards such as Internet protocols are used by authority, or are people looking at it because the benefits are far beyond the cost? There have been many attempts to establish standards that have miscarried. Sometimes, standards that have not been widely used are even enforced by decrees or government regulations: the ADA language is one example.

I believe it is the benefits of following standards that are widely accepted. For railway services, for example, what really matters is the combination of railways that are laid by different companies, or the coordinated work of products from several companies. Several large enterprises have joined forces to establish SOAP standards. The Web Service Description Language (WSDL) provides a convenient way to coordinate with the providers and users of this Web service, making it easier for us to get the benefits of soap. The railroad lines of several companies are not so difficult, they need to follow only the standard distance between the two rails. This is much more complicated for Web service. We must first work out the standard format for the specified interface.

It has been said that soap does not really need any interface description language. If soap is the standard for communicating pure content, it requires a language to describe the content. SOAP messages do have certain types of information, so SOAP allows dynamic decision types. But do not know the function name of a function, the number of parameters and the respective types, how can you call this function? Without the WSDL, I can determine the calling syntax from the prerequisite document, or check the message. Any method, must be involved, the process may be wrong. Using WSDL, I can automate the generation of Web service proxies through this cross-platform and cross-language approach. Like COM and corba IDL files, WSDL files are contracted by the client and server.

Note that because WSDL is designed to bind to protocols other than soap, we focus primarily on the relationship of WSDL to soap on HTTP. Similarly, because SOAP is currently used primarily to invoke remote procedures and functions, WSDL supports the documentation specification for SOAP transmissions. WSDL 1.1 has been submitted to the consortium as a record (see http://www.w3.org/TR/wsdl.html)

   WSDL Document Structure

To understand an XML document, it is useful to think of it as a block diagram. The following figure illustrates the structure of the WSDL in XML document format, which reveals the relationship between the five columns of the WSDL document.

A WSDL document can be divided into two parts. The top part consists of an abstract definition, while the bottom part consists of a specific description. The abstract section defines SOAP messages in a platform-and language-independent manner that does not contain any random or language-invariant elements. This defines a range of services that can be implemented by disparate sites. Things that vary with the site, such as serialization, are grouped into the bottom because it contains a specific definition.

   L Abstract Definition

Types

Independence with machine and language type definitions

Messages

Include function arguments (input and output separate) or document description

Porttypes

Refers to the message definition in the message section to describe the function signature (operation name, input parameter, output parameter)

   2 Specific Definitions

Bindings

Each operation of the Porttypes section is implemented in this binding

Services

Determine the port address for each binding

In the following illustration, an arrow connector represents a relationship between different columns in a document. The dots and arrows represent references or usage relationships. The double arrows represent the modify relationship. The arrow in the "a" indicates the inclusion 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 bar references the Porttypes bar, the service bar references the bindings bar, The Porttypes and bindings columns contain the operation element, and the services bar contains the port element. The operation element in the Porttypes column is further modified or described by the operation element in the Bindings column.

In this context, I will use standard XML terms to describe the WSDL document. element refers to the elements of XML, and "attribute" refers to the attributes of an element. So:

<element attribute= "Attribute-value" >contents </element>
Content may also consist of one or more elements in a recursive manner. The root element is the most advanced element among all elements. Child elements are always subordinate to another element, the parent element.

Note that there may be only one types column in the document, or none at all. All other columns can have only 0 elements, single elements, or multiple elements. The list of WSDL requires that all columns appear in a fixed order: import, types, message, portType, binding, service. All abstractions can exist separately in other files, or they can be imported from the main document.



Figure I: Abstract definitions and specific definitions

Original address: http://www.yesky.com/20011013/200759.shtml

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.