Now that you have a better comprehension of client-server architectures, we will code an example that follows this diagram:
Example of client-server architecture
The functionality of our application will be simple. The server will expose an endpoint with the customer's bank statement, and then we will code a few clients to consume that information.
There are a bunch of options to build the server side using the Spring Framework, including the following:
- SOAP web services
- RESTful Web Services
- Common Object Request Broker Architecture (CORBA)
- Sockets
- AMQP
SOAP web services were widely implemented by developers before the REST style appeared, and they are heavily based on the use of XML. There are also a bunch of libraries available to deal with them, including Apache CXF, and JAX-WS. The following screenshot represents a request payload for a simple addition operation:
Request payload
The following screenshot shows how...