WSDL Tutorial - PowerPoint PPT Presentation

1 / 30
About This Presentation
Title:

WSDL Tutorial

Description:

Before you study the WSDL tutorial, you should have a basic understanding of XML ... Task Force (IETF) Internet standards such as XML, HTTP, and DNS protocols. ... – PowerPoint PPT presentation

Number of Views:388
Avg rating:3.0/5.0
Slides: 31
Provided by: cseTt
Category:
Tags: wsdl | dns | tutorial

less

Transcript and Presenter's Notes

Title: WSDL Tutorial


1
WSDL Tutorial
  • Ching-Long Yeh ???
  • Department of Computer Science and Engineering
  • Tatung University
  • chingyeh_at_cse.ttu.edu.tw
  • httP//www.cse.ttu.edu.tw/chingyeh

2
Source
  • The slides in this presentation are made from the
    WSDL tutorial of W3Schools, available at
    http//www.w3schools.com/wsdl/default.asp

3
Introduction to WSDL
  • WSDL is an XML-based language to define Web
    services and how to access them.

4
What You Should Already Know
  • Before you study the WSDL tutorial, you should
    have a basic understanding of XML Namespaces and
    XML Schema.

5
What is WSDL?
  • Web Services Description Language
  • written in XML
  • an XML document
  • used to describe Web services
  • also used to locate Web services
  • not a W3C standard

6
WSDL Describes Web Services
  • WSDL stands for Web Services Description
    Language.
  • WSDL is a document written in XML.
  • The document describes a Web service.
  • It specifies the location of the service and the
    operations (or methods) the service exposes.

7
WSDL will Become a W3C Standard
  • WSDL is a suggestion by Ariba, IBM and Microsoft
    for describing services for the W3C XML Activity
    on XML Protocols.
  • A W3C Note is made available by the W3C for
    discussion only. Publication of this Note by W3C
    indicates no endorsement by W3C or the W3C Team,
    or any W3C Members.
  • Work in progress at W3C indicates that WSDL might
    become a W3C Working Draft before the end of
    2002, and an official Recommendation before the
    end of year 2003.
  • 9 July 2002 W3C has released the first public
    Working Draft of WSDL 1.2!

8
WSDL Documents
  • A WSDL document is just a simple XML document. It
    contains set of definitions to define a web
    service

9
The WSDL Document Structure
  • A WSDL document defines a web service using these
    major elements

ltportTypegt The operations performed by the web
service ltmessagegt The messages used by the web
service lttypesgt The data types used by the web
service ltbindinggt The communication protocols
used by the web service
10
ltdefinitionsgt lttypesgt definition of
types........ lt/typesgt ltmessagegt
definition of a message.... lt/messagegt
ltportTypegt definition of a port.......
lt/portTypegt ltbindinggt definition of a
binding.... lt/bindinggt lt/definitionsgt
11
WSDL 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 ltportTypegt element can be compared to a
    function library (or a module, or a class) in a
    traditional programming language.

12
WSDL 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.

13
WSDL Types
  • The lttypesgt element defines the data type that
    are used by the web service.
  • For maximum platform neutrality, WSDL uses XML
    Schema syntax to define data types.

14
WSDL Bindings
  • The ltbindinggt element defines the message format
    and protocol details for each port.

15
A Simplified WSDL Fragment
ltmessage name"getTermRequest"gt ltpart
name"term" type"xsstring"/gt lt/messagegt ltmessag
e name"getTermResponse"gt ltpart name"value"
type"xsstring"/gt lt/messagegt ltportType
name"glossaryTerms"gt ltoperation
name"getTerm"gt ltinput
message"getTermRequest"/gt ltoutput
message"getTermResponse"/gt
lt/operationgt lt/portTypegt
16
WSDL Ports
  • A WSDL port describes the interfaces (legal
    operations) exposed by a web service.

17
WSDL 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 port defines the connection point to a web
    service.
  • 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.

18
Operation 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

19
One-Way Operation
  • A one-way operation example

ltmessage name"newTermValues"gt ltpart
name"term" type"xsstring"/gt ltpart
name"value" type"xsstring"/gt lt/messagegt ltportTy
pe name"glossaryTerms"gt ltoperation
name"setTerm"gt ltinput name"newTerm"
message"newTermValues"/gt lt/operationgt lt/portTy
pe gt
20
Request-Response Operation
  • A request-response operation example

ltmeltmessage name"getTermRequest"gt ltpart
name"term" type"xsstring"/gt lt/messagegt ltmessag
e name"getTermResponse"gt ltpart name"value"
type"xsstring"/gt lt/messagegt ltportType
name"glossaryTerms"gt ltoperation
name"getTerm"gt ltinput
message"getTermRequest"/gt ltoutput
message"getTermResponse"/gt
lt/operationgt lt/portTypegt
21
WSDL Binding
  • WSDL bindings defines the message format and
    protocol details for a web service.

22
Binding to SOAP
ltmessage name"getTermRequest"gt ltpart
name"term" type"xsstring"/gt lt/messagegt ltmessag
e name"getTermResponse"gt ltpart name"value"
type"xsstring"/gt lt/messagegt ltportType
name"glossaryTerms"gt ltoperation
name"getTerm"gt ltinput message"getTermReq
uest"/gt ltoutput message"getTermResponse"/
gt lt/operationgt lt/portTypegt ltbinding
type"glossaryTerms" name"b1"gt ltsoapbinding
style"document" transport"http//schemas.
xmlsoap.org/soap/http" /gt ltoperationgt
ltsoapoperation soapAction"http//example
.com/getTerm"/gt ltinputgt ltsoapbody
use"literal"/gt lt/inputgt ltoutputgt
ltsoapbody use"literal"/gt lt/outputgt
lt/operationgt lt/bindinggt
  • A request-response operation example

23
WSDL and UDDI
  • Universal Description, Discovery and Integration
    (UDDI) is a directory service where businesses
    can register and search for Web services.

24
What 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
  • UDDI communicates via SOAP
  • UDDI is built into the Microsoft .NET platform

25
What is UDDI Based On?
  • UDDI uses World Wide Web Consortium (W3C) and
    Internet Engineering Task Force (IETF) Internet
    standards such as XML, HTTP, and DNS protocols.
  • UDDI uses WSDL to describe interfaces to web
    services
  • Additionally, cross platform programming features
    are addressed by adopting SOAP, known as XML
    Protocol messaging specifications found at the
    W3C Web site.

26
UDDI Benefits
  • Any industry or businesses of all sizes can
    benefit from UDDI
  • Before UDDI, there was no Internet standard for
    businesses to reach their customers and partners
    with information about their products and
    services. Nor was there a method of how to
    integrate into each other's systems and
    processes.
  • Problems the UDDI specification can help to
    solve
  • Making it possible to discover the right business
    from the millions currently online
  • Defining how to enable commerce once the
    preferred business is discovered
  • Reaching new customers and increasing access to
    current customers
  • Expanding offerings and extending market reach
  • Solving customer-driven need to remove barriers
    to allow for rapid participation in the global
    Internet economy
  • Describing services and business processes
    programmatically in a single, open, and secure
    environment

27
How 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.

28
Who is Supporting UDDI?
  • UDDI is a cross-industry effort driven by all
    major platform and software providers like Dell,
    Fujitsu, HP, Hitachi, IBM, Intel, Microsoft,
    Oracle, SAP, and Sun, as well as a large
    community of marketplace operators, and
    e-business leaders.
  • Over 220 companies are members of the UDDI
    community.

29
The Full WSDL Syntax(1)
ltwsdldefinitions name"nmtoken"?
targetNamespace"uri"gt ltimport
namespace"uri" location"uri"/gt
ltwsdldocumentation .... /gt ?
ltwsdltypesgt ? ltwsdldocumentation ....
/gt ? ltxsdschema .... /gt
lt/wsdltypesgt ltwsdlmessage name"ncname"gt
ltwsdldocumentation .... /gt ?
ltpart name"ncname" element"qname"?
type"qname"?/gt lt/wsdlmessagegt
ltwsdlportType name"ncname"gt
ltwsdldocumentation .... /gt ?
ltwsdloperation name"ncname"gt
ltwsdldocumentation .... /gt ?
ltwsdlinput message"qname"gt ?
ltwsdldocumentation .... /gt ?
lt/wsdlinputgt ltwsdloutput
message"qname"gt ?
ltwsdldocumentation .... /gt ?
lt/wsdloutputgt ltwsdlfault
name"ncname" message"qname"gt
ltwsdldocumentation .... /gt ?
lt/wsdlfaultgt lt/wsdloperationgt
lt/wsdlportTypegt
30
The Full WSDL Syntax(2)
ltwsdlserviceType name"ncname"gt
ltwsdlportType name"qname"/gt
lt/wsdlserviceTypegt ltwsdlbinding
name"ncname" type"qname"gt
ltwsdldocumentation .... /gt ? lt-- binding
details --gt ltwsdloperation
name"ncname"gt ltwsdldocumentation
.... /gt ? lt-- binding details --gt
ltwsdlinputgt ?
ltwsdldocumentation .... /gt ? lt--
binding details --gt lt/wsdlinputgt
ltwsdloutputgt ?
ltwsdldocumentation .... /gt ? lt--
binding details --gt lt/wsdloutputgt
ltwsdlfault name"ncname"gt
ltwsdldocumentation .... /gt ?
lt-- binding details --gt
lt/wsdlfaultgt lt/wsdloperationgt
lt/wsdlbindinggt ltwsdlservice name"ncname"
serviceType"qname"gt ltwsdldocumentation
.... /gt ? ltwsdlport name"ncname"
binding"qname"gt ltwsdldocumentation
.... /gt ? lt-- address details --gt
lt/wsdlportgt lt/wsdlservicegt lt/wsdldefin
itionsgt
Write a Comment
User Comments (0)
About PowerShow.com