Javatpoint Logo
Javatpoint Logo

Working With WSDL File

WSDL stands for Web Service Description Language. It describes the web services and exchanges the information in a decentralized or distributed environment. It is used to create a relationship between the service requester and the service provider. It is an XML based language to describe the functionality of a SOAP-based web service.

In this section, we will learn how to deal with WSDL file in SoapUI.

Features of WSDL

There are following features of WSDL:

  • It is an XML based language that defines how to interact with an XML based service in SoapUI.
  • It is used to configure nodes in the SOAP domain.
  • It is used to describes the functional characteristics of web service.
  • It is used to set a defined endpoint in web service with a set of input, output, and fault messages.
  • WSDL is an XML-based language and it is platform-independent.
  • It is pronounced as wiz-dull and is written as W-S-D-L.

WSDL Schemas in terms of Soap and XML:

WSDL is an important component for building web applications. It facilitates various applications that are built on multiple languages to interact with each other. WSDL is used as the combination of SOAP and XML schemas that provide communication between the clients and web services over the internet. To read the WSDL file, the client program must connect to the Web service and specify the operation required to connect to the Web server.

WSDL Document Elements

  • Definitions: It is the basic element of the WSDL document that contains the definition of one or more services.
  • Types: The Type element is used to give information about the complicated data types used within the WSDL document.
  • Message: It contains abstract data that is being used in communication between client and web server. It also defines the data elements for each operation.
  • portType: It contains the collection of abstract operation supported by one or more endpoints.
  • Port: It is used to define the single endpoint as an address for the binding.
  • Services: It is a collection of endpoint networks that specify the port address for the binding.
  • Binding: It specifies how operations are implemented by concrete protocols and data format features for operation and messaging.

Structure of WSDL Document

The following code snippet shows the structure of WSDL documents.

We can also add other elements such as extension elements and service elements combined into a single WSDL document with possible definitions of multiple web services.

The following are the four major transmissions of the WSDL that support endpoint in the SoapUI tool.

  1. One Way
  2. Request and Response
  3. Solicit response
  4. Notification

One way: A one-way service can only receive one-way messages. It means that the client can send a request to the server by executing an operation with a single input element.

Request and Response: The Request and Response service is used to send a request to the server and receive a response from the web server. It has two operation elements. The first input element is followed by another element to send and receive the request and response in the web service.

Solicit Response: A solicit response consists of an operation involving two input elements. The first input element contains a server request for the client, followed by one input element of the client's response back to the server.

Notification: A server sends information or message to a client machine. Therefore, a notification consists of an operation that includes an input element to send a notification to the client.

Create a WSDL File

For creating a WSDL file, we have to follow the steps given below:

Step 1: Go to the File -> New SOAP Project.

Working With WSDL File

Step 2: Click on the New SOAP Project; it shows the below screen.

Working With WSDL File

Step 3: Type the following WSDL URL in the Initial WSDL text box, as shown below.

After that click on the OK button.

Working With WSDL File

It automatically sets the project name. We can also change the project name during the initialization of the WSDL URL.

Working With WSDL File

Step 4: SoapUI will load and parse the specified WSDL URL contents into the object model, as shown below.

Working With WSDL File

Note: When we work with a project, SoapUI saves the WSDL file to the cache to avoid unnecessary requests. To use a WSDL file in the SoapUI, we need to set the cache definition's property to FALSE.

Explore WSDL

We can explore the WSDL file's service by double-clicking on the Navigator to open the editor.

The overview tab is used to display the general information of the WSDL file, such as:

  • WSDL Definition
  • WSDL URL
  • Namespace
  • Binding
  • Soap Version
  • Style
  • Definition Parts
  • Operations
Working With WSDL File

The service endpoint is used to include the endpoint for the interface in the WSDL file. Additionally, we can specify more than one endpoint for a WSDL service that requires authentication.

Working With WSDL File

The WSDL Content provides detailed information of the WSDL file.

Working With WSDL File





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA