Explaining WSDL Basics


After completing this lesson, you will be able to:

  • Explaining WSDL basics

Web Service Description Language (WSDL)

You can find the latest specification, WSDL 2.0, at wsdl20. The WSDL contains the description of distributed systems and provides instructions for automating data exchange between applications. The WSDL is used to describe web services or electronic services in XML format. A service is defined as a collection of endpoints (ports) and the messages they work with. By using WSDL, it is possible for a service provider to describe the requirements and functions of its web service in such a way that a potential customer understands them and interacts correctly with the service.

WSDL is not restricted to a specific message or network protocol, for example version 1.1 contains definitions for SOAP 1.1, HTTP GET/POST, and MIME.

Although WSDL is not a final standard, it is still a widely used language rule on a variety of web service platforms. For example, the Web Service Interoperability Organization (Web Service I) was established to facilitate the rapid deployment of web services. The Basic Profile 1.0 and 1.1 of Web Service I confirms WSDL 1.1 as one of the key specifications. The JAVA developer community, as well as leading manufacturers of web service platforms, such as Microsoft .Net, IBM Websphere, BEA Web Logic, SAP Netweaver, support WSDL. WSDL is used to describe the 'operational' interface, comparable to an Interface Definition Language (IDL). The conception of WSDL provides for a division into an "abstract" and a "concrete" description of the interfaces.

WSDL 1.1 Structure

The structure of a WSDL 1.1 document consists of the following parts (element names in brackets):

  • Definition (definitions)

    The root element in which you define different namespaces as attributes.

  • Types (types)

    A container for data type definitions, when using a typing system, for example XSD.

  • Messages (message)

    An abstract term for communicated data. A message element consists of a set of part elements. Each part element refers to a type defined in the types element. A part could represent a parameter of a message of a function call.

  • Port Type (portType)

    Defines a web service, the operations that can be performed, and the messages that are used to perform the operation.

  • Operation (operation)

    Operation is an abstract name for the possible actions of a service. Every operation consists of its name and one to three messages: an input, output, and possibly a fault message. Depending on whether an operation involves an input and output message, or only one of these two messages, there are different types of operations in a port type (one-way, notification, etc.):

    • One way:

      The operation can contain a message, but it does not return a message

    • Request/Response:

      The operation identifies an input message and returns a message

    • Solicit response:

      The operation can send a message, and waits for a response.

    • Message:

      A message can be sent, and no response is expected.

  • Binding (binding)

    A concrete protocol and data format definition (SOAP, HTTP-GET, etc.) for a specific port type.

  • Service (service)

    A grouping of used ports or a grouping of related interfaces, consisting of ports for a service.

  • Port (port)

    A single port as a combination of a binding and a network address.

WSDL 1.1 vs 2.0

Abstract Section and Concrete Section

The WSDL consists of an abstract section that only defines the operations with the message and data types without a concrete implementation. At SAP, this type is created in the Enterprise Service Repository (ES Repository), for example. If you add the "binding" and "service element" to the abstract part using a configuration, you get a concrete WSDL and thus a complete WSDL, that now also contains the endpoint URL. This WSDL now contains all the information to consume a web service.

In 2007, the WSDL version 2.0 was released. SAP still only supports version WSDL 1.1 in SAPNWDS 7.5, so we will deal exclusively with WSDL 1.1.

The changes for WSDL 2.0 are the following:

  • Further semantic descriptions were added.
  • Message construct was removed.
  • Operator overloading not supported.
  • portType was renamed to interface.
  • port was renamed to endpoint.

Examine the WSDL of the OrderGetDetail - Web Service

Log in to track your progress & complete quizzes