What is Web service Discovery Language in web Services

February 28, 2018 Author: virendra
Print Friendly, PDF & Email

Web Services Description Language (WSDL) is a format for describing a Web Services interface. WSDL describes a web service at both an abstract and a concrete level. At the abstract level, the web service is described by the messages it sends and receives. Typically an XML Schema is used for this. At the concrete level, the web service’s transport and wire format for one or more interfaces are described.



Overview of Web Services Description Language

WSDL is an XML-based format for describing Web services. Clients wishing to access a Web service can read and interpret its WSDL file to learn about the location of the service and its available operations. In this way, the WSDL definition acts as the initial Web service interface, providing clients with all the information they need to interact with the service in a standards-based way. Through the WSDL, a Web services client learns where a service can be accessed, what operations the service performs, the communication protocols the service supports, and the correct format for sending messages to the service. A WSDL file is an XML document that describes a Web service using six main elements:

The WSDL document that describes a Web service acts as a contract between Web service client and server. By adhering to this contact the service provider and consumer are able to exchange data in a standard way, regardless of the underlying platforms and applications on which they are operating.

The conceptual model for WSDL is described as a set of mandatory or optional elements with properties. The W3C describes these elements as components. Look at table 2.1 for structure overview:

Table 2.1: WSDL Structure Overview

It is a way to describe services and how they should be bound to specific network addresses. WSDL has three parts:

  • Definitions
  • Operations
  • Service bindings

Definitions are generally expressed in XML and include both data type definitions and message definitions that use the data type definitions. These definitions are usually based upon some agreed upon XML vocabulary. This agreement could be within an organization or between organizations. Vocabularies within an organization could be designed specifically for that organization. They may or may not be based on some industry-wide vocabulary. If data type and message definitions need to be used between organizations, then most likely an industry-wide vocabulary will be used.

Operations describe actions for the messages supported by a Web service. There are four types of operations:

  • One-way: Messages sent without a reply required
  • Request/response: The sender sends a message and the received sends a reply.
  • Solicit response: A request for a response.
  • Notification: Messages sent to multiple receivers.

Service bindings connect port types to a port. A port is defined by associating a network address with a port type. A collection of ports defines a service. This binding is commonly created using SOAP, but other forms may be used. These other forms could include CORBA Internet Inter-ORB Protocol (IIOP), DCOM, .NET, Java Message Service (JMS), or WebSphere MQ to name a few.

The following figure shows the relationship of the basic parts of WSDL:

Web service discovery language

Figure 1: Basic Parts of WSDL




Web service Discovery Language Elements

The WSDL file contains the following main parts:

  • The <types>tag is used to define all the complex datatypes, which will be used in the message exchanged between the client application and the web service. This is an important aspect of the client application, because if the web service works with a complex data type, then the client application should know how to process the complex data type. Data types such as float, numbers, and strings are all simple data types, but there could be structured data types which may be provided by the web service. For example, there could be a data type called EmployeeDataType which could have 2 elements called “EmployeeName” of type string and “EmployeeID” of type number or integer. Together they form a data structure which then becomes a complex data type.
  • The <messages>tag is used to define the message which is exchanged between the client application and the web server. These messages will explain the input and output operations which can be performed by the web service. An example of a message can be a message which accepts the EmployeeID of an employee, and the output message can be the name of the employee based on the EmpoyeeID provided.
  • The <portType>tag is used to encapsulate every input and output message into one logical operation. So there could be an operation called “GetEmployee” which combines the input message of accepting the EmployeeID from a client application and then sending the EmployeeName as the output message.
  • The <binding>tag is used to bind the operation to the particular port type. This is so that when the client application calls the relevant port type, it will then be able to access the operations which are bound to this port type. Port types are just like interfaces. So if a client application needs to use a web service they need to use the binding information to ensure that they can connect to the interface provided by that web service.
  • The <service> tag is a name given to the web service itself. Initially, when a client application makes a call to the web service, it will do by calling the name of the web service.

Web service Discovery Language Features

A web service is an important component in building modern day web applications. Their main purpose is to allow multiple applications built on various programming languages to talk to each other. For instance, we can have a .Net web application talks to a Java application via a Web service. A web service has the following key features:

  • It is built using the XML programming language. Almost all modern day technologies such as .Net and Java have corresponding commands that have the ability to work with XML. Hence, XML was taken as the most appropriate language for building web services.
  • Web services communicate over HTTP. HTTP is a protocol used by all web-based applications. Hence, it just made sense to ensure that Web services also had the ability to work over the HTTP protocol.
  • Web services conform to a particular language specification.
  • Web services have a description language known as WSDL, which is used to describe the web service.

The WSDL file is written in plain old XML. The reason that it is in XML is so that the file can be read by any programming language.



References

[1] W3C Working Group. Web Services Description Language (WSDL) Version 2.0 Part 1: Core Language, November 2003. www.w3.org/TR/wsdl20.

[2] Lekha V. Bhandari, “Review Paper on Web Service Security”, International Journal on Computer Science and Engineering (IJCSE), Vol. 6 No.03 Mar 2014

[3] “Service Architecture”, available online at: https://www.service-architecture.com/articles/web-services/web_services_description_language_wsdl.html

[4] “WSDL Tutorial: Web Services Description Language with Example”, online available at: https://www.guru99.com/wsdl-web-services-description-language.html

 

 

No Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Insert math as
Block
Inline
Additional settings
Formula color
Text color
#333333
Type math using LaTeX
Preview
\({}\)
Nothing to preview
Insert