A web service (also known as web service) provides an interface for machine-to-machine or application communication based on HTTP or HTTPS over computer networks such as the Internet . Data is exchanged and functions are called on remote computers . Each web service has a Uniform Resource Identifier (URI) that can be used to clearly identify it, as well as an interface description in machine-readable format (as an XML artifact, e.g. WSDL ) that defines how to interact with the web service. Communication can (but does not have to) run via protocols from the Internet context such as HTTP and can be XML- or JSON- based. A web service is platform-independent and distributed over several systems.
Client programs generally send requests to a web service, and the web service responds with the requested information. Web services are part of software systems that automatically exchange data or call functions on remote computers.
Web services are based on service-oriented architecture (SOA) and therefore combine distributed and object-oriented programming standards and are geared towards business solutions on the Internet.
The instances user (service consumer), (service) provider and directory can be identified.
The provider publishes the description of its services in a directory. The user searches the directory and selects the desired service. After any further protocol details have been exchanged, the dynamic connection of the consumer to the provider takes place. The user now uses the methods of the web services of this provider.
The basis for this are three standards, each based on XML and described in more detail in the associated articles:
- UDDI as a directory service for registering web services. It enables the user to find the web service (e.g. the soccer results service ) dynamically . However, UDDI is only used in rather smaller company networks and has never caught on globally.
- WSDL to describe the supported methods (e.g. ToreKoenig ) and their parameters (e.g. date ) for the programmer.
- SOAP (or XML-RPC ) for communication. The actual call is started here.
Web services map the three most important parts of the cooperation between client and server: the gathering, binding and data exchange.
Web services can be accessed via a unique URI. The platform-independent standards used are capable of remote method calls any platform to decode and transmit them to an application. This creates a distributed architecture. Communication with web services takes place via messages that can be transported using different protocols.
Web services can be implemented in different ways. The most common are:
- Remote Procedure Call (RPC), via remote function calls : WSDL-based, a loose coupling is not necessarily guaranteed
- SOAP as a kind of message service, WSDL-based
- REST , an attempt is made to limit the interface to a number of “defined” standard operations (based on HTTP: GET, PUT, POST, DELETE). The focus is on the interaction of stateless resources.
- Web services are not to be equated with enterprise application integration , but they can be used in enterprise application integration.
- Web services are not to be equated with web applications , but they can be used by web applications (the web application also provides a user interface for entering or displaying information for or from the web service).
- The open standards used avoid some license costs. Since these standards also include ubiquitous internet-based technologies, they can also be used in many places. There is also a cost advantage here.
- In fact, web services can be based on any transmission protocol. If there are a large number of different users on the Internet, HTTP is usually used for data transmission , as problems with firewalls rarely occur. This is an advantage over comparable technologies such as CORBA , DCOM or Java RMI . As described, web services are not bound to HTTP and can also be transmitted with other protocols such as SMTP - for example for asynchronous transfer - or FTP - for example for very large messages - and are therefore openly suitable for various application scenarios.
- The use of already existing and widespread Internet standards (HTTP, XML, etc.) results in an open and flexible architecture that is independent of the platforms, programming languages and protocols used. For example, to Windows - C # clients behind a firewall with Java servers, on Linux are implemented, communicate. The widespread standard protocols enable interoperability across any heterogeneity in the Internet .
- The barriers to entry are comparatively low.
- The main difficulties in implementing web services are likely to relate to security issues. During transport, it should be noted that important web services are encrypted or authentication can take place. Whether HTTPS is sufficient here or solutions such as XML Signature , XML Encryption or SAML should be preferred should be considered.
- Particular attention is paid to performance . This is negatively influenced by XML, parsing and file size. The administrative effort increases with widely distributed systems. The overhead is sometimes considerable.
- More know-how is required than e.g. B. for Remote Procedure Call (RPC). Programming languages with which you want to integrate web services need special libraries (e.g. for the Document Object Model ).
Web services represent new approaches in the context of Enterprise Application Integration (EAI) and grid computing . The planned main area of application is in the business-to-business area ( B2B ). Business processes should be handled easily across company boundaries. One language for this is WS-Business Process Execution Language (BPEL), which allows orchestration .
Another application is the geospatial services standardized by the Open Geospatial Consortium , which, as spatial web services , make geodata accessible in a structured form.
Web services can provide data and functions for any other computer systems that only need to be in a common network for their programs. There is also the option of having the spell check in OpenOffice checked by a web service from the University of Leipzig .
The power of this concept lies in the possibility of combining existing systems and services with one another across platforms and making them available in your own applications and services.
From 2002, Google Inc. operated a web service which, thanks to its functionalities, offered the same options as the user interface on the Google website itself. Programs could now search for information on the Internet by addressing the interface , received the result data via the interface and were able to do so use them for their own tasks. The parsing of the Google web page was to not even remotely equivalent alternative. However, Google has not issued any new access identifications (API keys) for this since December 2006 and discontinued the service in mid-2009.
A practical example is a computer reservation system between airlines and travel agents. The airlines provide options for looking up or booking flights via a web service. The travel agencies offer flights from various airlines on their website, which the travel agencies can find out about via UDDI at runtime . The customer can now compare prices and dates of various flights centrally on the travel agency's website and book them straight away.
With the Web Services Composite Application Framework (WS-CAF), a more detailed specification was submitted to the W3C and OASIS for standardization, the web services to be used for the coordination of applications standards, such as. B. transaction management should expand. Various manufacturers are considering further, proprietary extensions. To counter security problems , concepts are developed based on the Security Assertion Markup Language (SAML).
Furthermore, the field of semantic web services deals with the extension of web services with semantics, which should enable and simplify the discovery, selection, invocation and composition with other web services based on the idea of the semantic web .
- WS- * (modular extensions to SOAP / WSDL)
- Ingo Melzer et al .: Service-Oriented Architectures with Web Services . 4th edition. Spektrum, Heidelberg 2010, ISBN 3-8274-2549-2 ( website for the book [accessed February 26, 2013]).
- Sanjiva Weerawarana, F. Curbera, F. Leymann: Web Services Platform Architecture . Prentice Hall PTR, Upper Saddle River / NJ 2005, ISBN 0-13-148874-0 (English).
- Michael P. Papazoglou: Web Services: Principles and Technology . Prentice Hall, Essex 2007, ISBN 978-0-321-15555-9 (English).
- Sides of the W3C on Web Services (English)
- Definition of the web services at W3C (English)
- Implementation of a web service in Java - step-by-step instructions for the implementation of a web service in Java
- Description of web services in the GI lexicon
- ^ Web Services Glossary. Retrieved January 27, 2020 .
- ↑ Geoff Bender: XML vs JSON Based Web Services: Which is the Best Choice? In: Segue Technologies. March 29, 2013, accessed October 19, 2015 .
- ↑ Web service. Retrieved January 27, 2020 .