Web Service Description Language WSDL Detailed (6)

zhaozj2021-02-08  276

and Elements

The Binding column is the full description of the protocol, serialization, and encoded places, Types, Messages, and PortType columns to process abstract data content, and the Binding column is the physical implementation of processing data transmission. The Binding column is embodied with the abstraction of the top three parts.

Separate the relevant data formulation and message statement, which means that the provider of the same type of service can standardize a series of operations. Each provider can provide custom binding to each other. WSDL also has an important structure that allows abstract definitions in separate files, rather than bindings and services, which can provide standardized abstraction definitions between different service providers, which is helpful. For example, banks can use WSDL documents to standardize some bank operations. Each bank is still free to order the underlying protocol, serial optimization, and encoding.

Below is the Binding column of the overloaded WSDL example, which is repeated to discuss:

element has taken a name ("foosamplebinding" in this example), which can be referenced by the element of the Services column. It has a "type" attribute reference , this example is "WSDLNS: FoosamplePortType". The second line is the extended element of MSTK2 , which specifies the preferredEncoding property as "UTF-8". element specifies the style ("RPC") and the mode of transmission. The TRANSPORT property applies a Namespace, which is this NameSpace specifies the use of the HTTP SOAP protocol.

There are two elements named "foo". The only difference is their respective names, respectively, "foo1" and "foo2". The element in two Elements has the same "soapaction" attribute, which is the URI. The SOAPAction property is a SOAP-specific URI, which is just simple to use for SOAP messages. The resulting SOAP message has a soapaction header, and the URI also works only in the element. The soapaction property is required in HTTP's binding, but do not provide in other non-http binding. It is unclear that it is currently used, but it seems to help two "foo" operations in this example. SOAP 1.1 Indicates the "intent" used by the soapaction to determine the message. It seems that the server can use this property to send messages without parsing the entire message. In fact, it uses a variety of uses. Element can also contain another property, "style" attribute, can be used when there is a need to conflict element specified.

The property can contain , , and , which correspond to the same elements in the PortType column. Only the element is provided in the above example. Each of these three elements can have an optional "name" attribute, in this case, we use this method to distinguish between the same name. There is a element in this example of this example, which information is specified in the information body written into the SOAP message. This element has the following properties:

USE

Used to develop data "eNCoded" or "Literal". "LITERAL" refers to the SOAP message contains data that exists in the format in the abstract definition (Types, Messages, and PortTypes). "Encoded" means "encodingstyle" attribute determines the encoding method.

Namespace

Each SOAP message can have its own namespace to prevent naming conflicts. This property is used by the URI to use in the results SOAP message.

EncodingStyle

For SOAP encoding, it should have the following URI value: "http://schemas.xmlsoap.org/soap/encoding"

Document style implementation

In the previous column, the element has a type attribute, set to "RPC". This property will change the serialization of the message when it is set to "Document". Unlike the function signature, the current message is transferred in document. In such binding, element defines document format instead of a function signature. As an example, consider the following WSDL fragments:

< / message> ...

Schema has two elements: SimpleElement and CompositeElement, there is a type declaration (CompositType). The only statement of the element has four parts: P1: Composite type; P2: INT type; p3: SimpleEleMent type; p4: CompositeElement type. There is a table with a table, a Binding made of four types / type: RPC / Literal, Document / Litral, RPC / Encoded, and Document / Encoded. The table indicates the performance of each binding. and elements

Service is a set of elements. Under one or one, each element is associated with a Location. If the same has multiple elements associated with it, you can use the additional URL address as a replacement.

A WSDL document can have multiple elements, and multiple elements are very useful, one of which is to organize ports based on the target URL. This way, I can easily use another to redirect my stock market inquiry application. My client program still works, because this service based on the protocol is not changed without service. Another effect of multiple elements is based on a particular protocol division port. For example, I can put all HTTP ports in the same , all SMTP ports in another . My client can search with the protocol it can handle.

In a WSDL document, the NAME property of is used to distinguish between different services. Because there are multiple ports in the same service, they also have the "name" attribute.

to sum up

I described the most significant feature of the WSDL document about SOAP. However, it should be explained that WSDL is not limited to SOAP on HTTP. WSDL is used to describe HTTP-POST, HTTP-GET, SMTP, and other protocols very clear. Using WSDL, SOAP is easier to handle, whether developers or users. I believe that WSDL and SOAP will create a new era of network application world.

There is a series of XML elements in the WSDL's Namespace. The following table summarizes those elements, their properties and content.

Element property content (child) nametargetnamespacexmlns (other namespaces) name name nametype name nametype (empty) nameparameterOrder namemessage (empty) namemessage (EMPTY) NameMessage (EMPTY) namebinding resources:

1.

WSDL 1.1

2.

SOAP 1.1

3.

XML Schema Primer

4.

MS SOAP Toolkit Download Site

5.

A Tool for translating idl to wsdl

6.

Free Web Services Resources Including a WSDL To VB Proxy Generator

7.

Pocketsoap: SOAP Related Components, Tools & Source Code

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

New Post(0)