Web Service Definition
Web service is a standard or protocol that facilitates data exchange in the form of XML (Extensible Markup Language) between client and server applications over the internet.
Web Service Architecture
The web service architecture comprises of three roles which are:
- Provider - Creates the web service and offers it to the client application
- Requestor - Client application needs to communicate with the web service
- Broker - Provides access to the Universal Description, Discovery and Integration, UDDI (helps the client application to find the web service)
Web Service Types
- REST = Representational State Transfer Uses HTTP (which supports HTTP methods and CRUD-oriented services) or Uniform Resource Identifier (URI)
- SOAP = Simple Object Access Protocol Uses XML for data and HTTP and SMTP for transmission
Web Service vs Web API
Web services are API but not all APIs are web services. Web services use 3 main communication style which include REST, SOAP and XML-RPC while web APIs can us any communication style.