Web services are typically composed of a number of application programming interfaces ( APIs ) that perform requests for services submitted by customers over a network, such as the remote server side of the Internet.

Although the definition of W3C covers many different and incomprehensible systems, we usually refer to the transfer of XML format messages between the master-slave architecture (Client-server) according to the SOAP protocol.

Regardless of the definition or implementation, the WEB service process provides a machine-readable description (usually based on WSDL ) by the server to identify the WEB service provided by the server.

In addition, although WSDL is not a necessary condition for SOAP service endpoints, the current Java-based mainstream WEB service development framework often requires WSDL to implement client source code generation.

Some industry standardization organizations, such as WS-I, enforce SOAP and WSDL in the definition of WEB services.

Way of using WEB service

A web service is actually a set of tools and is called by a number of different methods. The three most common approaches are Remote Procedure Call (RPC), Service Oriented Architecture (SOA), and Representational State Transfer ( REST )

Remote procedure call

The WEB service provides a distributed function or method interface for the user to call, which is a more traditional way. Typically, the RPC interface is defined in WSDL (similar to the earlier XML-RPC).

Although the original WEB service was widely deployed in RPC mode, the criticism of its too tight coupling was also followed.

This is because the RPC-style WEB service essentially utilizes a simple mapping to translate user requests directly into functions or methods written in a particular language.

Today, most service providers have determined that this approach will be difficult in the future, and they are no longer supporting remote procedure calls under the WS-I Basic Profile.

Service-oriented architecture

Now, the industry is more concerned with building a WEB service in compliance with the Service-oriented Architecture (SOA) concept.

In a service-oriented architecture, communication is driven by messages and is no longer an action (method call). This kind of WEB service is also called a message-oriented service.

The SOA-style WEB service is supported and affirmed by most major software vendors and industry experts. As the biggest difference from the RPC approach,

the SOA approach is more focused on how to connect to service than to specific details of implementation. WSDL defines the necessary content of the contact service.

Representational state transfer

Representational state transfer REST ​​WEB services are similar to HTTP or other similar protocols that restrict interfaces to a set of well-known standard actions such as HTTP GET, PUT, DELETE for invocation.

Such web services focus on interactions with stable resources, not messages or actions.