Rational Developer for System z, Version 7.6

WSDL interfaces

The WSDL interface document defines the message format for operations and messages defined by a particular port type.

Web Services Description Language (WSDL) is a standard specification for describing networked, XML-based services. It provides a simple way for service providers to describe the basic format of requests to their systems regardless of the underlying runtime implementation. A WSDL specification contains the following parts:

The operations editor allows you to create and modify port types, messages, and types. These artifacts are part of the web service interface document.

The WSDL document specifies a Web service interface definition, which includes the elements shown in the following table:
Component: Contains:
Port type Operation signature
Messages Parameter definitions
Types Complex type definitions
Bindings Transport protocol and preload format

When the Web service is implemented, it contains the following components derived from the WSDL document:

portType

The description of the operations and their associated messages. PortTypes define abstract operations.

Figure 1. portType

<portType name="EightBall">
   <operation name="getAnswer">
      <input message="ebs:IngetAnswerRequest"/>
      <output message="ebs:OutgetAnswerResponse"/>
   <operation/>
<portType>

message

The description of parameters (input and output) and return values.

Figure 2. Message

<message name="IngetAnswerRequest">
   <part name="meth1_inType" type="ebs:questionType"/>
</message>
<message name="OutgetAnswerResponse">
   <part name="meth1_outType" type="ebs:answerType"/>
</message>

type

The schema for describing XML complex types used in the messages.

Figure 3. Type

<types>
   <xsd:schema targetNamespace="...">
      <xsd:complexType name="questionType">
         <xsd:element name="question" type="string"/>
      </xsd:complexType>
      <xsd:complexType name="answerType">
      ...

binding

Bindings describe the protocol used to access a service, as well as the data formats for the messages defined by a particular portType.

Figure 4. Binding

<binding name="EightBallBinding" type="ebs:EightBall">
   <soap:binding style="rpc" transport="schemas.xmlsoap.org/soap/http">
   <operation name="ebs:getAnswer">
   <soap:operation soapAction="urn:EightBall"/>
      <input>
         <soap:body namespace="urn:EightBall" ... />
      ...

Service

Contains the Web service name and a list of the ports.

Ports

Contains the location of the Web service and the binding to used to access the service.

Figure 5. Port

<service name="EightBall">
   <port binding="ebs:EightBallBinding" name="EightBallPort">
      <soap:address location="localhost:8080/axis/EightBall"/>
   </port>
</service>

WSDL service interface example

The abstract service interface provides operation definitions (functions) and the messages used.

The following example WSDL file shows the relationship between the messages, operation, and portType that comprise a service interface definition.

Figure 6. WSDL service interface

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="StockQuote"
   targetNamespace="http://example.com.wsdl/stockquote/"
   xmlns="http://schemas.xmlsoap.org/wsdl/"
   xmlns:tns="http://example.com.wsdl/stockquote/"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <message name="getQuoteRequest">
      <part name="ticker" type="xsd:string"/>
   </message
   <message name="getQuoteResponse">
      <part name="result" type="xsd:float"/>
   </message
   <portType name="StockQuote">
      <operation name="getQuote" parameterOrder="ticker">
         <input message="tns:getQuoteRequest" name="getQuoteRequest"/>
         <output message="tns:getQuoteResponse" name="getQuoteResponse"/>
      </operation
   </portType
</definitions>


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)