What is a WSDL?

WSDL, or web Service mô tả tìm kiếm Language, is an XML based definition language. It’s used for describing the functionality of a SOAP based web service.

Bạn đang xem: Structure of a wsdl document

WSDL files are central lớn testing SOAP-based services. x-lair.com uses WSDL files lớn generate thử nghiệm requests, assertions và mock services. WSDL files define various aspects of SOAP messages:

Whether any element or attribute is allowed lớn appear multiple timesThe required or optional elements and attributesA specific order of elements, if it is required

You may consider a WSDL file as a contract between the provider & the consumer of the service. x-lair.com supports 1.1 version of the WSDL specification and corresponding bindings for SOAP versions 1.1 and 1.2.

This article explains how lớn work with WSDL files in x-lair.com. If you are looking for a WSDL example, or if you want to learn about the differences between WSDL và WADL, please see SOAP vs REST.


Article Index
Explore WSDL
Validate the WSDL against the WS-I Basic Profile
Generating Code for your WSDL

Work with WSDLs in x-lair.com

Create Project From WSDL

To take a closer look at a WSDL file, create a new project và import a sample WSDL file:

In x-lair.com, click

*
or select File > New SOAP Project

*

In the dialog box, specify the following URL in the Initial WSDL field:

http://www.dneonline.com/calculator.asmx?wsdlLeave the mặc định settings and click OK

x-lair.com will load the specified WSDL and parse its contents into the following object model:

*

A WSDL can contain any number of services (thebindings). A binding exposes an interface for the specified protocol. In the example above, the WSDL tệp tin exposes two bindings: one for SOAP 1.1 (“CurrencyConverterSoap”) and one for SOAP 1.2 (“CurrencyConverterSoap12”).

Tip: x-lair.com saves the WSDL tệp tin to a cache to avoid unnecessary network requests when you work with the project. If you want x-lair.com to lớn always use a remote WSDL file, set the Cache Definition project property to lớn False.

*

Explore WSDL

Double-click the service in the navigator to open the editor:

The Overview tab contains general information on the WSDL file: its URL, target namespace, etc.

*

The Service Endpoint tab contains endpoints for the interface:

*

Besides endpoints specified in the WSDL file, you can add endpoints for the service. For each endpoint, you can specify the required authentication.

Validate the WSDL against the WS-I Basic Profile

Since the initial creation of WSDL & SOAP, a multitude of standards have been created và embodied in the web Services domain, making it hard to lớn agree on exactly how these standards should be used in a website Service Context. Lớn make interoperability between different website Service vendors easier, the web Service Interoperability Organization (WS-I; http://www.ws-i.org) has defined the WS-I Basic Profile - a phối of rules mandating how the standards should be used. x-lair.com is bundled with version 1.1 of the profile. Use it to check the conformance of a WSDL file & SOAP messages.

To validate the WSDL Service:

Double-click the service in the Navigator và switch khổng lồ the WS-I Compliance tab

Click

*
khổng lồ run validation

- or -

Right-click the service in the Navigator

x-lair.com will show the validation report:

*

To validate SOAP messages:

Open a SOAP request and send it

Right-click within the XML panel of the response editor and select Check WS-I Compliance

*

x-lair.com generates the corresponding report that highlights any compliance errors for the current request/response message exchange.


*

x-lair.com mở cửa Source

Support for SOAP & REST API Testing.Easy multi-environment switching.Detailed kiểm tra history and test comparison reporting.
*

x-lair.com Pro

Support for SOAP, REST, & GraphQL API Testing.Easy multi-environment switching.Detailed thử nghiệm history and test comparison reporting.

Xem thêm: " Chú Trọng Tiếng Anh Là Gì ?, Tiếng Việt Tra Từ Chú Trọng


Generating Code for your WSDL

There are many web service development frameworks that allow you to lớn generate code from a WSDL file. This can be either client code that calls operations specified in a WSDL file, or stubs for implementing the service itself. ReadyAPIvides a graphical interface for most frameworks. Khổng lồ generate it:

Right-click the service in the Navigator panel và select the desired framework from the Generate Code popup menu

*

For example, if you select the Apache CXF framework, you will see the following dialog:

*

Specify the desired settings and click Generate. x-lair.com will launch the corresponding command-line tool:

*

Note: You must specify the path to the corresponding tool on the Tools page of x-lair.com Preferences.