Web Service Description Language WSDL - PowerPoint PPT Presentation

1 / 25
About This Presentation
Title:

Web Service Description Language WSDL

Description:

(e.g., 'Find me all the shopping carts I can talk to.') WSDL Concepts by Example. Shopping Cart ... schema targetNamespace='http://myservice.net/cart/types' ... – PowerPoint PPT presentation

Number of Views:60
Avg rating:3.0/5.0
Slides: 26
Provided by: johncsc
Category:

less

Transcript and Presenter's Notes

Title: Web Service Description Language WSDL


1
Web Service Description Language (WSDL)
  • John Schneider
  • Chief Technologist
  • john.schneider_at_agiledelta.com

2
Overview
  • What is WSDL?
  • WSDL Concepts
  • What things does WSDL describe?
  • WSDL Syntax
  • How does WSDL describe these things?
  • WSDL Use Cases
  • How might you use WSDL?

3
What is WSDL?
  • An XML format for describing web services
  • To the Consumer How to use the service(e.g.,
    To use my shopping cart, send these SOAP
    messages over HTTP to http//myservice.net/cart)
  • To the Server How to configure the
    service(e.g., Make my shopping cart available
    using SOAP over HTTP at http//myservice.net/cart
    )
  • To the Registry How to find the service(e.g.,
    Find me all the shopping carts I can talk to.)

4
WSDL Concepts by Example
Shopping Cart
Add
Remove
List
5
WSDL Concepts by Example
WSDL Terms
Port Type
Operation
Shopping Cart
Add
Remove
List
6
WSDL Concepts by Example
WSDL Terms
Shopping Cart Service
Port Type
Operation
AddItemInput
Shopping Cart
Binding
Port
Add
HTTP SOAP
Remove
Service
HTTP XML
List
Message
7
What does WSDL Describe?
  • Abstract Concepts
  • Port Types (e.g., shopping basket)
  • Operations (e.g., add, remove, list)
  • Messages (i.e., inputs, outputs and faults)
  • Data types (i.e., schemas)
  • Concrete Bindings
  • Data encoding styles (e.g., SOAP encoding)
  • Transport protocols (e.g., HTTP, SMTP)
  • Network addresses (e.g., http//myservice.net/cart
    )

8
How does WSDL Describe Things?
  • ltdefinitions nameShoppingCartDefinitions
  • xmlnshttp//schemas/xmlsoap.org/wsdl
    targetNamespace gt
  • lttypesgt lt/typesgt
  • ltmessage nameAddItemInputgt lt/messagegt
  • ltmessage nameAddItemOutputgt lt/messagegt
  • ltportType nameShoppingCartgt lt/portTypegt
  • ltbinding nameCartHTTPXMLBinding
    typetnsShoppingCartgt
  • ltbinding nameCartSOAPBinding
    typetnsShoppingCartgt
  • ltservice nameShoppingCartServicegt
  • ltport nameHTTPXMLCart bindingtnsCartHTTPXM
    LBindinggt
  • ltport nameSOAPCart bindingtnsCartSOAPBindi
    nggt
  • lt/servicegt
  • ltimport namespace locationgt
  • lt/definitionsgt

9
How WSDL Describes Port Types
  • A named collection of related operations
  • ltportType nameShoppingCartgt
  • ltoperation nameAddItemgt lt/operationgt
  • ltoperation nameRemoveItemgt lt/operationgt
  • ltoperation nameListItemsgt lt/operationgt
  • lt/portTypegt

10
How WSDL Describes Operations
  • A signature (input, output and fault messages)
  • Operations can be one-way, request-response,
    notifications or solicit-response
  • ltoperation nameAddItemgt
  • ltinput messagetnsAddItemInput/gt
  • ltoutput messagetnsACK/gt
  • ltfault nameBadCartID messagetnsBadCartID/
    gt
  • ltfault nameServiceDown messagetnsServiceDo
    wn/gt
  • lt/operationgt

Add
11
How WSDL Describes Messages
  • A named collection of message parts
  • Each part has a name and a type
  • ltmessage nameAddItemInputgt
  • ltpart namecart-id typexsdstring/gt
  • ltpart nameitem typecarttypesitem/gt
  • ltpart nameimage typexsdbase64Binary/gt
  • lt/messagegt

12
How WSDL Describes Data Types
  • Using the XML Schema language (however, other
    type systems are permitted)
  • lttypesgt
  • ltschema targetNamespacehttp//myservice.net/car
    t/types
  • xmlnshttp//www.w3.org/2000/10/XMLSchemagt
  • ltcomplexType nameitemgtltallgt
  • ltelement namedescription typexsdstring/gt
  • ltelement namequantity typexsdinteger/gt
  • ltelement nameprice typexsdfloat/gt lt/all
    gtlt/complexTypegt
  • lt/schemagt
  • lt/typesgt

13
How WSDL Describes Bindings
  • A named association of protocol details with a
    port type, its operations and its messages
  • ltbinding nameCartHTTPXMLBinding
    typetnsShoppingCartgt
  • lthttpbinding verbPOST/gt
  • ltoperation nameAddItemgt
  • lthttpoperation location/AddItem/gt
  • ltinputgt ltmimemimeXML/gt lt/inputgt
  • ltoutputgt ltmimemimeXML/gt lt/outputgt
  • ltfault nameBadCartIDgt ltmimemimeXML/gt
    lt/faultgt
  • ltfault nameServiceDowngt ltmimemimeXML/gt
    lt/faultgt lt/operationgt
  • lt/bindinggt

HTTP XML
14
How WSDL Describes Bindings
  • A named association of protocol details with a
    port type, its operations and its messages
  • ltbinding nameCartHTTPXMLBinding
    typetnsShoppingCartgt
  • lthttpbinding verbPOST/gt
  • ltoperation nameAddItemgt
  • lthttpoperation location/AddItem/gt
  • ltinputgt ltmimemimeXML/gt lt/inputgt
  • ltoutputgt ltmimemimeXML/gt lt/outputgt
  • ltfault nameBadCartIDgt ltmimemimeXML/gt
    lt/faultgt
  • ltfault nameServiceDowngt ltmimemimeXML/gt
    lt/faultgt lt/operationgt
  • lt/bindinggt

HTTP XML
15
How WSDL Describes Bindings
  • A named association of protocol details with a
    port type, its operations and its messages
  • ltbinding nameCartHTTPXMLBinding
    typetnsShoppingCartgt
  • lthttpbinding verbPOST/gt
  • ltoperation nameAddItemgt
  • lthttpoperation location/AddItem/gt
  • ltinputgt ltmimemimeXML/gt lt/inputgt
  • ltoutputgt ltmimemimeXML/gt lt/outputgt
  • ltfault nameBadCartIDgt ltmimemimeXML/gt
    lt/faultgt
  • ltfault nameServiceDowngt ltmimemimeXML/gt
    lt/faultgt lt/operationgt
  • lt/bindinggt

HTTP XML
16
How WSDL Describes Bindings
  • A named association of protocol details with a
    port type, its operations and its messages
  • ltbinding nameCartHTTPXMLBinding
    typetnsShoppingCartgt
  • lthttpbinding verbPOST/gt
  • ltoperation nameAddItemgt
  • lthttpoperation location/AddItem/gt
  • ltinputgt ltmimemimeXML/gt lt/inputgt
  • ltoutputgt ltmimemimeXML/gt lt/outputgt
  • ltfault nameBadCartIDgt ltmimemimeXML/gt
    lt/faultgt
  • ltfault nameServiceDowngt ltmimemimeXML/gt
    lt/faultgt lt/operationgt
  • lt/bindinggt

HTTP XML
17
How WSDL Describes Bindings
  • A more complex example
  • ltbinding nameCartHTTPSOAPBinding
    typetnsShoppingCartgt
  • ltsoapbinding styleRPC transporthttp//schem
    as.xmlsoap.org/soap/http/gt
  • ltoperation nameAddItemgt
  • ltsoapoperation soapActionhttp//myservice.net
    /cart/AddItem/gt
  • ltinputgt
  • ltsoapbody useencoded namespacehttp//myse
    rvice.net/cart
  • encodingStylehttp//schemas.xmlsoap.org/soap
    /encoding/gt
  • lt/inputgt
  • ltoutputgt
  • ltsoapbody useencoded namespacehttp//myse
    rvice.net/cart
  • encodingStylehttp//schemas.xmlsoap.org/soap
    /encoding/gt
  • lt/outputgt
  • ltfault nameBadCartIDgt ltsoapbody
    useencoded namespace /gt lt/faultgt
  • ltfault nameServiceDowngt ltsoapbody use /gt
    lt/faultgtlt/operationgt
  • lt/bindinggt

SOAP XML
18
How WSDL Describes Ports
  • A named association of a protocol binding with a
    network address
  • ltport nameSOAPCart bindingtnsSOAPCartBindin
    ggt
  • ltsoapaddress locationhttp//myservice.net/soa
    p/cart/gt
  • lt/portgt
  • ltport nameHTTPXMLCart bindingtnsHTTPXMLCart
    Bindinggt
  • lthttpaddress locationhttp//myservice.net/car
    t/gt
  • lt/portgt

HTTP SOAP
http//myservice.net/soap/cart
HTTP XML
http//myservice.net/cart
19
How WSDL Describes Services
  • A related collection of ports
  • ltservice nameShoppingCartServicegt
  • ltdocumentationgtA Shopping Cart for the
    Weblt/documentationgt
  • ltport nameHTTPXMLCart bindingtnsHTTPXMLCart
    Bindinggt
  • lthttpaddress locationhttp//myservice.net/car
    t/gt
  • lt/portgt
  • ltport nameSOAPCart bindingtnsSOAPCartBindin
    ggt
  • ltsoapaddress locationhttp//myservice.net/soa
    p/cart/gt
  • lt/portgt
  • lt/servicegt

20
How WSDL Describes Reuse
  • ltimport namespacehttp//webservices.org/cart/car
    t-type locationhttp//services.org/cart/cart-t
    ype.wsdl/gt
  • ltbinding xmlnswshttp//webservices.org/cart/car
    t-type nameCartHTTPXMLBinding
    typewsShoppingCartgt

21
How might you use WSDL?
  • Use an application to automatically generate Web
    Service stubs from WSDL
  • Assists in developing standard web services
  • Service provider fills in implementation details

WSDL
Web Service
22
How might you use WSDL?
  • Use an application to automatically generate WSDL
    descriptions of Web Services
  • Describe web services to consumers
  • Associate technical details with UDDI entries

Web Service
23
How might you use WSDL?
  • Use as a declarative way to configure services

WSDL
Web Service
24
How might you use WSDL?
  • Use to configure remote service proxy objects
  • Insulate consumers from invocation details
  • Support fail-over to other addresses and
    protocols
  • Insulate consumers from changes (e.g., location)

WSDL
Web Service
Remote Service
25
Review and Questions
Write a Comment
User Comments (0)
About PowerShow.com