I. Definition of WebService
There are several definitions of webservice:
- The organization defines it: WebService is a software system designed to support cross-network interoperability between machines.
- WebService is typically defined as a set of modular APIs that we can invoke over the network to run the remote system's request service.
- WebService is a set of APIs exposed to external use that can be called through the web.
- WebService is a remote invocation technique across programming languages and cross-operating system platforms.
- Web Service = Xml+xsd,soap and WSDL
In fact, these multiple definitions are only from different angles. Different heights to understand the webservice, and finally all the same.
On the surface, WebService is an API that the application exposes to the outside to be able to call through the Web. It tells us that there is a set of objects here. What methods it has, and what the method name is. What is the required number of references. The type of the parameter, the method will give you what value to return. What exceptions may occur. How do you call it. What communication protocols are used for data transmission and so on. This method can be called programmatically. Access to the services provided by this webservice. This explains the definition of 2, 32. This is the outward manifestation of webservice.
In the deep sense, WebService is a new technology architecture which constructs the distributed system and realizes interoperability. is a platform, is a set of standards.
It defines how interoperability is implemented on the network, regardless of which language you are using. What kind of operating system. Its biggest feature is cross-network, cross-platform. Achieving interoperability is its purpose. Interoperability refers to the interaction between different machines in the network, or the same network. What interoperability is required between the same machine?
In the definition of a network, the word "machine" implies whether it is a Windows system, an Apple system or a Linux system. Interoperability can be achieved regardless of whether the machine is using Java or c,c# language. This is the intrinsic value of webservice. is a higher, deeper system architecture.
WebService to build such a cross-language, cross-network distributed platform. It must provide a set of protocols or standards. No matter what platform has its own data representation method and data type system. It must provide a unified type system to communicate differences between different languages, different platforms, and different component models so that they can communicate.
It must also provide a set of criteria for describing the narrative webservice, allowing the client to get enough and sufficient information to invoke it.
Finally, it needs to provide a remote calling method that tells the client what format or way to invoke webservice.
This corresponds to the three major technologies of WebService: Xml+xsd,wsdl,soap.
Web Service = Xml+xsd,soap and WSDL This is explained from the technical implementation level webservice
WebServices and WebService
At first glance, it seems that one is a plural form. One is a singular form. However. WebServices refers to the overall technical framework used for architecture WebService, WebService represents an example of an application created using the WebServices technical framework.
Of course, sometimes webservices also indicate detailed application examples, only then is the generic (plural). Sometimes WebService also represents the overall technical framework for architecting services. So the meanings of these two words need to be determined by context, and attention should be paid to reading the document.
Second, WebService platform technology
Xml+xsd,soap and WSDL are the three major technologies that make up the WebService platform.
xml+xsd
WebService uses the HTTP protocol data transfer, which encapsulates the data in XML format (that is, which method in XML describes invoking a remote service object). What is passed and what the return result of the service object is. XML is the format for representing data in the WebService platform. In addition to being easy to establish and easy to analyze, the basic advantage of XML is that it is platform-independent. is not vendor-independent.
Independence is more important than technical superiority: Software vendors do not choose a technology invented by competitors.
XML overcomes the problem of data representation, but it does not define a set of standard data types, much less how to extend this set of data types.
For example, what does the number of plastic numbers represent? 16-bit, 32-bit, 64-bit? These details are important for interoperability. XML Schema (XSD) is a set of standards that specifically address the problem.
It defines a standard set of data types. and gives a language to extend this set of data types. The WebService platform uses XSD as its data type system.
When you construct a Web service in a language such as. NET or java,c language, in order to conform to the WebService standard. All of the data types you use must be converted to XSD types. The tool you're using may have volunteered to help you out. This conversion
SOAP:
WebService send the request and receive the result through the HTTP protocol, must have the certain format, does not say that sends a request by the HTTP to be able. Both the requested content and the resulting content are encapsulated in XML format and some specific HTTP message headers are added. To describe the content format of the HTTP message. These specific HTTP message headers and XML content formats are the SOAP protocol.
SOAP provides a standard RPC method to invoke a Web Service.
SOAP protocol = HTTP protocol + XML data format
The SOAP protocol defines the format of the SOAP message. The SOAP protocol is based on the HTTP protocol, SOAP is also based on XML and XSD, and XML is the data encoding method of soap.
HTTP is the basic protocol, and SOAP adds a series of formatting restrictions to the underlying protocol. Make a metaphor: HTTP is the normal highway. XML is the middle of the green barrier and on both sides of the fence, soap is the normal highway through the addition of the barrier and the fence has been modified by the rapid road.
WSDL:
WebServiceClient to invoke a WebService service, you first need to know where the address of the service is. And what methods in this service can be called, so the WebService server is the first to use a WSDL file to explain what services in their home can be called externally. What the service is (what methods are available in the service, and what are the parameters accepted by the method). The return value is what the network address of the service is represented by which URL address. How the service is invoked. WSDL is a descriptive narrative of webservice.
Just like you bought a bulk bike, you have to attach a product manual. I'll tell you how to assemble the bike. The function of each part.
WSDL (Web Services Description Language) is such an XML-based language. Used to describe the Web service and its functions, parameters, and return values. It is a standard format that both the WebServiceClient and server sides can understand.
Because it is XML-based. So WSDL is both machine readable and human readable, which is a great advantage.
Some of the latest development tools can generate WSDL documents based on your Web service, import WSDL documents, and generate proxy class code that calls the corresponding webservice.
The WSDL file is saved on the webserver. It can be visited by a URL address.
Before the client wants to invoke a WebService service. The address of the WSDL file for the service to know. The WebService service provider is able to expose its WSDL file address in two ways: 1. Register to Uddiserver to be found. 2. Tell the client caller directly.
Three, webservices system architecture model
The WebService architecture is based on three roles (service provider, service center). The interaction between the service requester). Interaction details involve publishing, finding, and binding operations. The service provider provides webservice descriptive narrative and publishes the service to the service requester or service center. The service requester uses the find operation to search the service description narrative from the local or service center, then binds the service provider using the service descriptive narrative and invokes the corresponding WebService implementation to interact with it. Service Center is a collection of Web services, bringing together a very many online Web services in general, after the service provider installs the Web service to the online server, it publishes the Web service to the service center. This allows the service center to include more and more technical information about Web services.
For now, the service center is the UDDI Business center.
The service provides this and the service requester role is a logical structure that shows the relationships and interactions between the three.
- services Provider (service Provider)
From an enterprise point of view. This is the whole of the service.From an architectural standpoint, this is the platform for hosting access services.
- service Requestor (requestor)
From an enterprise point of view. This is an enterprise that requires specific requirements to be met.From an architectural point of view. This is the application that seeks and invokes the service, or initiates interaction with the service. The service requester role can be performed by the browser, with someone or a non-interface application (such as a webservice) to control it.
- Service Center (services Registry)
This is a searchable description of the services described in the booklet center. Service providers publish their description of the service here.In the static binding development or dynamic binding run phase, the service requester locates the service and obtains the binding information for the service (in the service description).
For statically bound service requesters, the service center is optional. Because the service provider is able to send the description of the service directly to the service requester.
The same service requester is also able to obtain a description of the service from sources other than the service center. For example: Local files, FTP sites, Web sites, Ads text files (advertisement and Discovery of Services) or disco files (Discovery of webservices).
Iv. webservices Protocol Stack
Previously, webservice to build a cross-language, cross-network distributed platform. Also in order to ensure the basic access to the transaction, workflow, security mechanism, and so on. It must provide a set of protocols or standards.
A conceptual WebServices protocol stack is presented.
The upper layer is built on the functionality provided by the lower layer protocol.
Network Transport Layer
The WebService protocol stack is based on the network transport layer.
WebService to be called by the service requester. You have to be able to access it through the Internet. Access to the Internet is webservice with a widely deployed network protocol: HTTP. Of course, in some special applications, WebService also supports FTP protocol (file transfer), and SMTP protocol (e-mail). On the intranet, WebServices also supports the use of middleware as an infrastructure for transport interactions, such as IBM's MQ Series (renamed MQ) and CORBA (Common Object Request Broker Architecture)
One of the advantages of WebService is the ability to provide a unified programming model for the development and use of services on the Internet and intranet.
So for developers, the choice of network protocols and technologies is transparent.
Data Presentation Layer
The XML of the data presentation layer provides the information and descriptive means of data description for the WebServices upper level protocol. XML is a standard way of describing data and exchanging data around the world at the moment.
In the era of webservices, all the specifications and techniques are based on XML as the underlying core and framework.
For WebServices. Both WebService invocation (SOAP Technology), WebService interface descriptive narrative (WSDL technology), or WebService Discovery (UDDI Technology) are standard ways of describing and exchanging XML as information.
Data Model Layer
Above the data representation layer is the data model layer. A data model describing the structure of a narrative (that is, metadata) is itself a data. Therefore, the way to describe the data structure is also the use of the WebServices standard method of representation: XML.
XML Schema is the standard data modeling language in the XML world, and the syntax of SOAP, WSDL, and UDDI is defined and described by XML Schema. XML Schema has become a standard communication tool in the XML world, similar to UML in software design.
XML-based message layer
At this level, WebServices uses the XML-based message Exchange protocol SOAP. Soap is built on the lower transport layer, which means that soap can be used alone or in conjunction with whatever transport layer protocol. All of the SOAP messages provide the advertised (Publish), bind (BIND), and lookup (find) features in the WebService schema that were previously mentioned.
SOAP consists of three parts:
- A mechanism for describing the content of a message using an XML envelope
- A uncorrupted set sequence rule to encode a wide variety of data formats
- A mechanism to provide remote procedure call (RPC) and response
Service descriptive narrative layer
The service description narrative provides a detailed method for invoking WebService. It is a basic standard for defining and describing the implementation and interface of WebService services based on XML format. This also means that the WSDL describes the service description as two parts: the service implementation and the service interface. Before we implement the service implementation according to WSDL, we must first define the service interface.
WSDL is simply the basic descriptive narrative of the service. To specify the relationship between the business environment, quality of service, and services. We also need to describe other means of narrative.
Service Announcement Layer
The WSDL document is simply the basic descriptive narrative of the service. It can be supplemented by other service descriptive narrative documents to describe more advanced information about webservices such as business environment, quality of service, etc.
At any stage in the service customer lifecycle, the WSDL document can be sent to the client of webservice. When this operation is involved, we need to go from the service description layer to the next service level of the service disclosure layer.
At this level, the service provider is able to send a WSDL document to the service client. One possible example is in the form of an email.
At the same time, the service provider is able to advertise the WSDL to a local UDDI library, or to a public/private UDDI Services hub where the service client can discover the WSDL document through the library.
Service Discovery Layer
The service discovery layer is based on the service advertisement layer. If the service is not advertised or cannot be advertised, it cannot be discovered.
The service client can also choose to discover the WSDL document through the local WSDL service center or the public/private UDDI Center at the design phase or runtime stage.
Service Workflow Layer
The WebServices Workflow Language (WSFL) is the standard language for the service workflow layer at the top level of the protocol stack. Unlike other standards in the protocol stack, WSFL is for business process modeling and workflow. WSFL is used to describe how webservice interacts in the workflow and the communication and synergy between services and services. This means that this webservice can be part of the workflow. can also be dynamically programmed into workflows. In particular, this workflow may occur between the buyer, the seller and the carrier.
For example, WSFL agrees that the Workflow Manager, from a composite webservices, defines each individual webservice as its constituent according to the workflow to define the different functions given by the business process. This business process includes financial statements, predictions, and 5-year it initiatives.
Web Service concepts, architecture, and related knowledge