A web service is contacted via a unique Uniform Resource Identifier (URI). Similar to a Uniform Resource Locator (URL), which can be used to address websites, the URI is an address for the corresponding web service. Theoretically, the directory service UDDI also plays a role, through which web services can be found. However, this service never prevailed and the biggest backers have withdrawn from the project.
The language Web Service Description Language (WSDL), however, is more important. A web service has a file in WSDL, in which the service is described in further detail. The client can understand from the information which functions it can perform on the server through the web service. Finally, the communication works through various protocols and architectures. The network protocol SOAP in combination with the Internet standard HTTP or also RESTful web services, for example, are very popular. Requests and answers are sent back and forth with these techniques.
The communication often works with Extensible Markup Language (XML). The relatively simple language can be understood by humans and computers alike and is ideally suited to connect systems with different preconditions. But REST also allows other formats such as JSON.
Here is a web service example for clarification: Let's start with software written in Visual Basic, running on a Windows computer. The program requires the service of an Apache web server. To enable this, the client sends a SOAP request in the form of an HTTP message to the server. The web service interprets the content of the request and ensures that the service performs an action. After execution, the web service formulates a response and sends it back to the client, again using SOAP and HTTP. There, the answer is interpreted again, and the information reaches the software, where it is further processed.