WSDL overview

Overview of WSDL
WSDL is to describe the XML Web services standard XML format, WSDL proposed by Ariba, Intel, IBM and Microsoft and other developers. Abstract way it is not related in a particular language and define the operations and messages relating to a given transceiver of the Web service. By definition, you can not as an object-WSDL interface definition language, for example, such as CORBA or COM application architecture will be used object interface definition language. WSDL agreement remain neutral, but it does built-in support for SOAP binding, so as to establish the inextricable link with SOAP. So, when I discuss WSDL in this article, I will assume you put your SOAP as the communication protocol.



WSDL protocol has been submitted to the W3C Internet standards body for approval, it is still in the "Confirm Submit" state. W3C maintains formal standardization system at the same time submit proposals must be approved by a process determined to eventually become the official protocol. In this case, WSDL position, according to outsiders, at least considered for standards organizations in the future may be part of the standard. If you are interested in the situation in this area, or special interest happens to be a result of "insomniac", then you may wish to W3C web site to read about the proposed standard.

With WSDL description of the service
as an XML-based standard, if you have some knowledge of XML, WSDL structure so you will not be a stranger. By the service WSDL document that describes a set of data elements of the type "message" service can be received and associated with each message SOAP binding composition.

A list is a simple WSDL document, the document released by the website with W3C WSDL model text is the same, it shows a stock quote service (which is fairly standard for Web services).

A careful re-reading list, you can see the document first starts with a standard XML header, which contains a version identifier, and the root element of the document is called definitions.

Definitions optional elements may be used several attributes documentation defining a document while using the remaining portion of the namespace (namespace). In this case, the definition is assigned a name (StockQuote), some name space definition is the acronym formulated according to the following general prefix:

TNS-abbreviation "this namespace", including the definition of the service main namespace
xsdl-XML Schema (XSD) namespace for the document type definition of
soap-SOAP binding namespace used in
the next interface for defining services needed in any complex type definitions within the type of elements required. Here you must pay attention to use the standard XSD syntax (property), which is the data type definition to create the most suitable method. However, if you wish, WSDL can be extended using a different type definition system.

Messages overview
by the use of WSDL, the message can be delivered to any return after the results of any methods or parameters on a service announcement called object. In order to continue to use the stock quote Web service example, the method most single definition as shown in the following pseudo-code:

floatgetLastTradePrice (String tickerSymbol)

In this way, just as you can see from the list A, document defines two messages, a representative of another method of input parameters tickerSymbol (GetLastTradePriceInput messages) on behalf of the return value (GetLastTradePriceResult message) of the method - the latest stock price.

The operation of the abstract message tissue together and represent a defined method. In our example, these two messages are object method getLastTradePrice operating element in the definition GetLastTradePrice organized. All operations in a WSDL file one by one they are grouped within portType element.

The rest of the WSDL document using a listening endpoint (binding elements) binding message on the server while the port is defined with a single service entity (service elements) together. A list of examples on the definition of the SOAP bindings by using the services they need.

WSDL tool
you can create a WSDL file by hand, but you have quite a number of tools can be used by the WSDL to automatically process and define a Web service. Recommended tools as follows:

Omniopera- a graphical user interface WSDL, XML and XSD Editor
SOAP Toolkit- a tool that Microsoft package, including the creation wizard COM interface based on WSDL definition, also includes a COM interface to create the WSDL Wizard according to programs
IBM's Web Services Toolkit- a kit including generating WSDL and SOAP deployment wizard explained

Reproduced in: https: //www.cnblogs.com/licheng/archive/2008/08/09/1264227.html

Guess you like

Origin blog.csdn.net/weixin_34368949/article/details/92631423