Overview of Web Services

Introducing web services

A web service is a particular type of Internet-based service provided by a web service provider. To start with, let’s see a more technical definition and find out a bit more about web services in general. After that, we’ll look at the characteristics of SOAP and REST web services.

Background to web services

What is a web service?

A web service can be defined as a web-based interface to an application hosted by a server; through this interface, clients (which may include other servers) have access to the application. The W3C’s definition is “a software system designed to support interoperable machine-to-machine interaction over a network”.

An important aspect of these definitions is that the resource is provided for consumption directly by computers rather than by users through their browsers.

Web services are part of what is known as the “programmable web”. There is a large and growing range of web services. Many provide resources, tools and utilities, such as calculators, reports and translators. Others simply provide a means of storing or moving data.

Characteristics of web services

Web services…

  • are self-contained
  • may be free of charge or available for purchase.
  • may be available on the Internet or limited to local intranets
  • use open protocols to pass data to clients

They use a growing range of technologies. The basic platform consists of:

  • XML – common language among different applications and platforms
  • HTTP – the most widely used Internet transport protocol

Other protocols, such as SOAP, or definitions, such as WSDL, may be incorporated, depending on the technologies employed.

TaskCentre and web services

TaskCentre tasks can be designed to connect to web services, sending data to them or retrieving data from them.

The multitude of web services available extends the range of possible business automation tasks, including the integration of applications, the input of data and much else.

In TaskCentre, web service connections are configured by TaskCentre administrators and task designers using the Web Service Connector tool. This is available in the Tools – Execute category under the System node.

Support for web services and standards

The Web Service Connector tool supports a wide range of web connection standards or architectures, including:

  • HTTP/HTTPS (Hypertext Transfer Protocol / Secure HTTP)
  • SOAP (Simple Object Access Protocol)
  • WSDL (Web Services Description Language)
  • REST (Representational State Transfer) including Open Data, Sage Data and Google Data

These allow for connection to a great range of web services, including Exchange 2007 and 2010, Dynamics NAV, Dynamics CRM, Sharepoint, Docmail, Magento e-commerce, DHL, UPS, Fedex, eBay, Sage SDATA and many more.

How does the Web Service Connector tool work?

The Web Service Connector tool is used to call web services. This involves passing data from TaskCentre to the web service. The web service replies with a success or error message.The tool supports XML, the document format most commonly delivered by web services.

It also supports JSON, which is becoming more common. HTTP is used in transporting the data. SOAP, REST and other protocols or architectures are also involved, depending on the web service provider.

Transaction processing support

Many web services require a series of messages to be passed back and forth between the service and the client. The Web Service Connector tool allows such messages to be wrapped in a single operation. OData web services can make use of transaction processing, and the tool supports this.

For transaction processing, a “start transaction” message is sent at the beginning of the sequence and, as long as there have been no errors, a “commit transaction” message is sent at the end. If any message produces an error, all message updates roll back to the initial state.

Authenticating the web service

Because web services implement security in many different ways, the Web Service Connector tool provides for both standardised and unstandardised methods of authentication.

The common standardised ways are simply selected from a list. Those included are None, Basic / Digest (simple username and password), Windows and Open (OAUTH). Unstandardised methods can be configured through message calls.

Focusing on SOAP

SOAP is one of the major technologies that underlie the provision of web services. Let’s have a look in more detail at some of the characteristics of SOAP now.

Introduction to SOAP

Web services and resources can be based on either the SOAP or the REST architecture.

What is SOAP?

SOAP (Simple Object Access Protocol) forms the core of many web service technologies. It is an interface and communications standard for exchanging information in web services.

SOAP uses HTTP and XML. XML provides the common web services markup language, enabling different platforms and applications to communicate. HTTP is the standard web transport protocol.

SOAP also works with a wide range of other standards. REST, another common web service technology also uses XML or alternatively JSON over the HTTP transport.

SOAP and Web Standards

SOAP was developed as a standard for designing web services, independent of platform, language and transport. This differed from earlier standards such as CORBA, which were tied to particular technologies. SOAP evolved from an earlier protocol, RPC-XML.

SOAP was released as a W3C standard in 2000 and is now a common web service protocol.

SOAP is supported by another XML-based W3C standard, WSDL (Web Services Description Language). This standard is used to define and locate web services.

SOAP uses many other standards, including a suite labeled WS-*, for various specialized purposes and UDDI, a directory service that stores information about web services and WSDL definitions.

How does SOAP work?

SOAP provides a means to extend application protocols, such as HTTP and to build new protocols that can be tunneled through HTTP. SOAP has the same basic structure of header and body as other standard Internet message formats such as HTML and XML.

SOAP services publish a WSDL file, which describes the operation and parameters of the service. The web service generally provides this on their web site. You may need to use the web service provider’s documentation to find the URL of the WSDL file.

Focusing on REST

The other common technology underlying web services, besides SOAP, is REST. Let’s examine REST in more detail now.

Introduction to REST

Web services and resources can be based on either the SOAP or the REST architecture.

What is REST?

As an alternative to using SOAP standards and protocols, web services can be based on REST design.

Unlike SOAP, REST is not a standard. It is a set of guiding principles for designing software architecture for networked systems, in particular the web, as a platform for distributed computing.

REST principles focus on system resources and resource states and how resources are transferred over HTTP. REST stands for representational State Transfer.

Many common web services are now REST based, including various booksellers, information providers and much else.

REST and Web standards

REST is an attempt to simplify Web services. It aims to avoid the complexity of multiple standards and to be less tied to proprietary middleware than SOAP or WSDL services.

Although it is not itself a standard, REST is based on the universal web-related standards HTTP and URL, and on XML.

It also makes use of other common web standards for transport, communication and format. These include HTML and resource formats such as GIF, JPEG and MIME media types.

All these standards are so widely usedon the web that the web itself is sometimes said to have a “RESTful” architectural style.

How does REST work?

REST design is more straightforward to understand and use than SOAP. With REST Web services every REST resource is represented by a URL. This makes it easy to write and configure clients for REST Web services.

REST requests are stateless: HTTP requests from clients are independent of other requests and complete in themselves. They contain all the data the server needs to act on them, without the server needing to keep track of context or variables or to pass these on to other servers.

This is important on the internet, where large clusters of servers may pass requests around to achieve efficiency through load-balancing. When the HTTP requests are self-contained, there is no need for servers to synchronise or query external applications, and as a result web performance improves. This makes REST services highly efficient.

Using HTTP methods

In the Rest design model, client applications use the following four HTTP methods to carry out operations.

  • POST – to create a resource on the server
  • GET – to retrieve a resource
  • PUT – to update a resource, i.e to change it’s state
  • DELETE – to remove or delete a resource

A REST query is usually returned in the form of XML.

For example, client applications use the GET verb to retrieve data and other resources from a web server or execute a query to which the web server will respond with matching XML or JSON resources.

Web Services: In summary

A web service is a web-based interface that allows access to resources hosted on a server. In a web service, resources are consumed directly by computers rather than by users through their browsers. Web services include a large range of tools, utilities and other services. Web services are based on the open standards XML and HTTP.

Web services employ one of two major technologies, SOAP and REST. SOAP is a W3C standard that makes use of WSDL, a standard which defines the service. REST is not a standard, but a set of design principles based on HTTP and XML and using URLs with four HTTP methods.

TaskCentre tasks can connect to web services. This involves passing data between TaskCentre and the web service. Connections to web services are configured using the Web Service Connector tool. The tool supports XML, HTTP, SOAP and REST. Options include the description of the service and setting of the authentication method. It also allows for transaction processing.

Return to TaskCentre Administration