XML infrastructure (2)
XML Web Service Description
The XML Web Service infrastructure is created based on the XML-based message communication that follows the published service description. Service description is an XML document written using the XML syntax of the WSDL language. It defines the XML Web Service Message format that can be understood by the XML Web Service. A service description acts as a protocol to define the behavior of an XML Web Service and instruct potential customers to interact with it. The behavior of the XML Web Service depends on the service definition and supported message types. These modes indicate what the service user can expect when a message in the corresponding format is sent to the XML Web Service.
For example, the request/response mode associated with a Remote Procedure Call (RPC) service defines which SOAP message mode is used to call a specific method. This mode also defines the format in which the response SOAP message will follow.
Another example of message mode is unilateral interaction. This mode is used when one-way communication occurs. In this case, the sender does not receive any messages, including fault messages, from the XML Web Service. The mode that defines the SOAP message format can be defined internally to describe the actual service. They can also be defined externally and imported into the service description.
In addition to the definition of the Message format and the message mode, the service description can also selectively contain the addresses of each XML Web Service endpoint. The address format corresponds to the protocol used to access the service. For example, the URL corresponds to HTTP or email address and SMTP (Simple Mail Transfer Protocol ).
For more information about the WSDL specification, see W3C Web site (http://www.w3.org/TR/wsdl ).
XML Web Service connection format
Binary protocols like DCOM are composed of a Method Request layer that removes the top of the proprietary communication protocol. Such a protocol is not helpful for creating universally available XML Web Services. This does not mean that you are prevented from using such protocols in the XML Web Service solution, but the disadvantage of using them is that such protocols rely on the specific structure of their underlying systems, this restricts the increase of potential customers.
Instead, you can construct XML Web Services to work together with one or more open protocols, just like the integrated use of HTTP and SOAP. As you expected, the infrastructure requires support for different protocols.
The XML Web Service is not limited to providing remote process call access. They can also be constructed to exchange structured information, such as purchase orders and invoices, and can also be used to automate and connect internal and external business processing.
HTTP-GET and HTTP-POST
HTTP-GET and HTTP-POST are standard protocol verbs that use HTTP to encode and transmit variable name/variable value pair parameters and use the relevant request semantics. Each HTTP-GET and HTTP-POST is composed of a series of HTTP request headers that define what the client has requested from the server, and the response is composed of a series of HTTP Response Headers and response data, if the request is successful, a response is returned.
The HTTP-GET Passes parameters in the format of urlencoded text that uses the MIME type application/x-www-form-urlencoded. Urlencoding is a character encoding that ensures that transmitted parameters are composed of compliant texts. For example, the encoding of a space is "% 20 ". The additional parameter can also be considered as a query string.
Like a HTTP-GET, HTTP-POST parameters are URL encoded. However, the variable name/variable value is not transmitted as part of the URL, but is transmitted within the actual HTTP request message.
Introduction to SOAP
SOAP is a simple, lightweight XML-based protocol used to exchange structured and modeled information on the Web. The overall design goal of SOAP is to keep it as simple as possible and provide the least functionality. This Protocol defines a message framework that does not contain applications or transport semantics. Therefore, this protocol is modular and very scalable.
Over the standard transmission protocol, SOAP can utilize the existing open architecture of the Internet and be accepted by any system that supports the most basic Internet standards. Over the standard transmission protocol, SOAP can utilize the existing open architecture of the Internet and be accepted by any system that supports the most basic Internet standards. You can see that the infrastructure requires a simple but powerful XML Web Service that complies with SOAP, because it basically does not add new content to the existing Internet infrastructure, however, it is helpful to access services constructed by SOAP.
The SOAP protocol specification consists of four main parts. The first section defines a forced extensible envelope (envelope) used to encapsulate data. A soap envelope defines a basic unit for exchanging a SOAP message with a SOAP information processor. This is the only mandatory part of the Specification.
The second part of the SOAP Protocol Specification defines the optional data encoding rules used to represent the data types and direct charts defined by the application, as well as a unified model for serializing non-syntactic data models.
The third part defines a Remote Procedure Call style (Request/Response) Information exchange mode. Each SOAP message is transmitted in one way. Although SOAP is rooted in RPC, it is not limited to the request/response mechanism. XML Web Services often work with SOAP messages to achieve this mode, but SOAP does not have to use the information exchange mode, and this part of the specification is optional.
The fourth part of this specification defines the binding between SOAP and HTTP. However, this part is optional. You can enable SOAP to work with any transfer protocol or mechanism that can send SOAP envelopes, including SMTP, FTP, or even a floppy disk.
For more information about SOAP specifications, see W3C Web site (http://www.w3.org/TR/soap ).