Information Technology Reference
In-Depth Information
and several binding technologies, but in this topic we shall restrict our ex-
planations to typical usage in the Web context. In the following we will use
exclusively XML Schema as the language for typing and SOAP as as binding
technology.
Fig. 4.2. Structures of WSDL 1.1 and WSDL 2.0
The left box in Fig. 4.2 shows the various elements of WSDL 1.0. The
top three boxes in the figure show generic elements of WSDL. PortTypes can
be seen as interfaces that may define several operations. The definition of
the inputs and outputs is encapsulated in a message construct that refers to
types defined in the generic type section of a WSDL file. The type section can,
basically, include one or more XML schemas that contain typing information.
The bottom two boxes in Fig. 4.2 represents the binding of the interface
definition (PortType) to a specific endpoint address and message format. The
endpoint indicates the physical address where messages can be sent to. In this
way, a WSDL specification separates the signature description of an interface,
i.e. operation names with inputs and outputs in a PortType, from the bindings
to a concrete transport protocol and an actual endpoint.
Listing 4.3 shows how inputs and outputs are defined in a WSDL file 6 and
how they can be linked to an operation. The type section can contain multiple
XML Schema definitions. The relevant definition in our example is the element
definition for getWeather . It indicates that there is a child element CityName
and CountryName of the type “string”. At the bottom of the listing one can
see a portType definition, alongside one operation GetWeather . The input
and outputs are not directly linked to XML elements, but to messages, which
in turn reference the previously defined types.
6 Taken from http://www.webservicex.net/globalweather.asmx?WSDL
 
Search WWH ::




Custom Search