When this article is written, there is no SOAP in it, and it can be used as an industry-name download. This is important for Java-enabled clients, because the interface used by the Java server will take advantage of Java's multiple downloads. But this is not so much about the client that uses COM because COM doesn't support downloading.
<binding> <operation> Elements
The Binding area is where you specify the communication protocol, serialization, and encoding. If the Types, Messages, and PortType sections are responsible for abstract information, then the Binding section is responsible for the processing of the data. The Binding section is responsible for the abstraction of the first three sections.
The sense that the connection is separated from the data and information announcements is that the service provider that performs the same business can portType a group of businesses (s). Each provider can provide an additional custom link if it is to highlight its own differences. It is good for WSDL to have a construct; because in this way, you can leave bindings and Services sections, abstract definitions in their own files, and can be scattered in the service providers, so that they set the abstract definition as standard. For example, a bank can be standardized, a group of abstract WSDL files to explain the details of the banking industry. But each bank is also free to "customize" the basics of messaging, sequencing, and encoding.
The following is a copy of the WSDL download example for the Binding section, which is repeated to facilitate detailed discussion:
The <binding> element will have a name (in this case "foosamplebinding") to facilitate the <port> element participation in the Services section. It has a reference <portType> "type", in this case the "wsdlns:foosampleporttype". The second line is the MSTK2-<stk:binding>, which can specify preferredencoding, or "utf-8".
<soap:binding> elements can be specified, using the same type (RPC) and the transport. The transport will participate in the naming space to make sure that the HTTP SOAP communication protocol is used.
There are two <operation> elements with the same name called "foo". The difference between these two professions is the two different <input> names: "foo1" and "foo2". The "soapaction" of the,<soap:operation> element in both <operation> elements is the same, and is a URI. SOAPAction is a soap-specialized URI and is used verbatim by SOAP messages. The SOAP message obtained in this way has a soapaction, and it is also valued as a URI in the <soap:operation> element. Although HTTP connectivity requires SOAPAction, non-HTTP connections are not required. When this article is published, its use is still unknown. For this example, it seems that it can be used to differentiate between two different "foo". SOAP 1.1 declares that SOAPAction can be used to realize the "purpose (intent)" of information. It is more recommended for the servo side, which can be used to route messages without parsing the entire message. In fact, the use of the difference is very large. The <soap:operation> element may also contain another term called "style", which can be used if the specific industry needs to overwrite the type specified in the <soap:binding> element.
The <input>, <output>, and <fault> elements contained in the <operation> element can be applied to the same elements in the Porttypes area. The only <input> elements that appear in the previous example. In this case, each of these three elements has a choice of "name" that can be used to name the same industry. In the <input> element of the example, there is a <soap:body> element that specifies the contents of the <body> of the input SOAP messages. This element has the following attributes:
Use
It is used to specify the data as "code (encoded)" or "constant value (literal)". The meaning of "constant value" is that the information contained in a SOAP message is formatted in exactly the specified specification of abstract definition (Types, Messages, and Porttypes section). The meaning of "code" is that the "encodingstyle" (reference below) specifies the way of encoding.
Namespace
Each SOAP message's main body has its own named space to prevent the name conflict. The URI specified by this nature is used verbatim in the result SOAP message.
Encodingstyle
In the way SOAP is encoded, the value of the URI should be "http://schemas.xmlsoap.org/soap/encoding".
File type
In the previous section,,<soap:binding> elements have a type that is set to "rpc". If you set this to "document", you can change the order of messages on the line. At this point the message becomes a document transfer, not a letter signature. In this type of connection, the,<message> element is a defined file format, not a letter signature. Please refer to the WSDL fragment in the following example:
This structure describes two elements, simpleelement and compositeelement, and a declarative type (Compositetype). The only <message> elements declared are four parts (part): P1 is Compositetype type, p2 is int type, p3 is simpleelement, and P4 is compositeelement. The following table is the comparison of four links, according to "Use/type": Rpc/literal, Document/literal, rpc/encoded, and document/encoded. This table shows how each link is reflected in the online reality.
<service> <port> Elements
Service is a group of <port> elements. Each <port> element is connected to a position and <binding> in one way or another. If there is more than one <port> element, and the same <binding> connection, you can use the other URL as a substitute.
In a WSDL file, you can have more than one <service> element. Many <service> elements can be used for many purposes. One of them is to group the transport groups according to the destination of the URL. So I just use another <service> will be able to reset the price requirements for all stocks, and my client program will still work, because in this kind of service group, the communication protocol will not be more mobile service. Another use of many <service> services is that, depending on the basis of the message, the transport is divided into different types. For example, all HTTP ports can be placed on one <service>; all SMTP ports for another <service>. The client can then search for the opposite <service> according to the communication that it can handle.
The "name" of,<service> in a WSDL file can distinguish between different services. Because a service is likely to have several ports, the transport must also have "name".
Total
This article has illustrated the most obvious SOAP features of the WSDL file. But it should be clear that the WSDL is not only about SOAP on HTTP. On SOAP, the WSDL's ability to express is absolutely sufficient to use Http-post, Http-get, SMTP, and other communication protocol. As long as the WSDL is used, it is the programmer or the general user who can easily handle SOAP. People are convinced that the integration of WSDL and SOAP will lead to a new type of application to make more use of the various Web services.
There are various kinds of XML elements in the namespace of the WSDL. The following table collates these elements, attributes, and contents for reference:
Elements of content (sub)
<definitions> Name
TargetNamespace
xmlns (other name space) <types>
<message>
<portType>
<binding>
<service>
<types> (NO) <xsd:schema>
<message> name <part>
<portType> name <operation>
<binding> Name
Type <operation>
<service> name <port>
<part> Name
Type (null value)
<operation> Name
Parameterorder <input>
<output>
<fault>
<input> Name
Message (null value)
<output> Name
Message (null value)
<fault> Name
Message (null value)
<port> Name
Binding <soap:address>
Resource:
WSDL 1.1
SOAP 1.1
XML Structure Description Entry
MS SOAP Toolkit Download Web site
Translator tools for IDL to WSDL
Free web resource for Proxy generators with WSDL to VB
Pocketsoap:soap components, tools, and source code
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.