Title: Introduction to WSDL
1Introduction to WSDL
2Source
- WSDL 1.1 specification
- http//www.w3.org/TR/wsdl
- WSDL 1.2 working draft
- http//www.w3.org/TR/wsdl12/
- W3C School Tutorial
- http//www.w3schools.com/wsdl/wsdl_intro.asp
3What is WSDL
- Web Service Description Language.
- An XML language used to describe and locate web
services. - Written in XML.
- Describe functionality of a web service
- Specify how to access the service (binding
protocol, message format, and etc.) - Not a W3C standard yet.
- Version 1.1 released March 2001
- Working draft of Version 1.2 released July 2003
4Related Standards
- Type System XML Schema
- Name space XML namespaces
- Binding SOAP, HTTP, MIME and etc.
5The Main Structure of WSDL
- ltdefinition namespace http/ gt
- lttypegt xschema types lt/typegt
- ltmessagegt lt/messagegt
- ltportgt a set of operations lt/portgt
- ltbindinggt communication protocols lt/bindinggt
- ltservicegt a list of binding and ports lt/servicegt
- ltdefinitiongt
6Types
- lttypesgt define types used in message declaration
- XML Schema, DTD, and etc.
- XML Schema must be supported by any vendor of
WSDL conformant products.
7- lttypesgt
- ltschema targetNamespace"http//example.com/sto
ckquote.xsd" xmlns"http//www.w3.org/2000/10/XMLS
chema"gt - ltelement name"TradePriceRequest"gt
- ltcomplexTypegt
- ltallgt
- ltelement
name"tickerSymbol" type"string - minOccur 1
maxOccur10/gt - ltelement name paymentgt
- ltcomplexTypegt
ltchoicegt - ltelement name
account typestringgt - ltelement name
creditcard typestringgt - lt/choicegt
lt/complexTypegt - lt/elementgt
- lt/allgt
- lt/complexTypegt
- lt/elementgt
- lt/schemagt
- lt/typesgt
8WSDL Messages
- The ltmessagegt element defines the data elements
of an operation. - Each messages can consist of one or more parts.
The parts can be compared to the parameters of a
function call in a traditional programming
language.
9ltmessage name"GetLastTradePriceInput"gt ltpart
name"body" element"TradePriceRequest"/gt
lt/messagegt ltmessage name"GetLastTradePriceOutp
ut"gt ltpart name"body" element"TradePrice"/gt
lt/messagegt
10WSDL Ports
- The ltportTypegt element is the most important WSDL
element. - It defines a web service, the operations that can
be performed, and the messages that are involved. - The ltportgt defines the connection point to a web
service, an instance of ltportTypegt. - It can be compared to a function library (or a
module, or a class) in a traditional programming
language. Each operation can be compared to a
function in a traditional programming language.
11ltportType name"StockQuotePortType"gt
ltoperation name"GetLastTradePrice"gt
ltinput message"tnsGetLastTradePriceInput"/gt
ltoutput message"tnsGetLastTradePriceOutput"
/gt lt/operationgt lt/portTypegt
12Operation Types
- The request-response type is the most common
operation type, but WSDL defines four types
- One-way The operation can receive a message but
will not return a response - Request-responseThe operation can receive a
request and will return a response - Solicit-responseThe operation can send a request
and will wait for a response - NotificationThe operation can send a message but
will not wait for a response - -- v 1.2 addition
- request multiple response
13One way and Notification Example
ltportType nameRegisterPort"gt ltoperation
nameregister"gt ltinput namecustomerInfo"
messageRegInfo"/gt lt/operationgt
ltoperation name register Responsegt
ltoutput name response messageResponseInfo/gt
lt/operationgt lt/portType gt
14Binding
- Binding defines how message are transmitted, and
the location of the service.
15ltbinding name"StockQuoteSoapBinding"
type"tnsStockQuotePortType"gt
ltsoapbinding style"document"
transport"http//schemas.xmlsoap.org/soap/http"/gt
ltoperation name"GetLastTradePrice"gt
ltsoapoperation soapAction"http//example.co
m/GetLastTradePrice"/gt ltinputgt
ltsoapbody use"literal"/gt
lt/inputgt ltoutputgt
ltsoapbody use"literal"/gt lt/outputgt
lt/operationgt lt/bindinggt
16ltservice name"StockQuoteService"gt
ltdocumentationgtMy first servicelt/documentationgt
ltport name"StockQuotePort" binding"tnsStockQuo
teBinding"gt ltsoapaddress
location"http//example.com/stockquote"/gt
lt/portgt lt/servicegt
17WSDL and UDDI
- Description of web service.
- Discovery of web service?
- UDDI yellow page.
18What is UDDI
- UDDI is a platform-independent framework for
describing services, discovering businesses, and
integrating business services by using the
Internet. - UDDI stands for Universal Description, Discovery
and Integration - UDDI is a directory for storing information about
web services - UDDI is a directory of web service interfaces
described by WSDL
19How can UDDI be Used
- If the industry published an UDDI standard for
flight rate checking and reservation, airlines
could register their services into an UDDI
directory. - Travel agencies could then search the UDDI
directory to find the airline's reservation
interface. - When the interface is found, the travel agency
can communicate with the service immediately
because it uses a well-defined reservation
interface. (by WSDL)
20Whats missing?
- Quality of service. (how fast, how reliable?)
- Smart Searching (currently business code match)
- DAML-S project.
- DARPA Agent Markup Language for web Services.
- Describes control flow
- Quality of service.
- Support smart discovery of service
- Ontology based technology.
- A big dictionary defining the relations between
concepts. - e.g. vehicle car truck
21Problems
- Complex long running web services.
- Communication infrastructure
- Asynchronous communication
- Analysis and verification
- Automatic composition of complex services.
-