WSDL Web Services Description Language - PowerPoint PPT Presentation

About This Presentation
Title:

WSDL Web Services Description Language

Description:

WSDL Web Services Description Language Neet Wadhwani University of Colorado 3rd October, 2001 Overview Introduction Definitions Working of WSDL SOAP Binding HTTP GET ... – PowerPoint PPT presentation

Number of Views:3
Avg rating:3.0/5.0
Slides: 25
Provided by: its1399
Category:

less

Transcript and Presenter's Notes

Title: WSDL Web Services Description Language


1
WSDL Web Services Description Language
  • Neet Wadhwani
  • University of Colorado
  • 3rd October, 2001

2
Overview
  • Introduction
  • Definitions
  • Working of WSDL
  • SOAP Binding
  • HTTP GET POST Binding
  • MIME Binding
  • References

3
Introduction
  • WSDL is an XML language that contains information
    about the interface semantics and administrivia
    of a call to a Web Service
  • Once you develop a Web Service you publish its
    description and a link to it in a UDDI repository
    so that potential users can find it
  • When someone wants to use your service, they
    request the WSDL file in order to find out the
    location of the service, the function calls and
    how to access them
  • Then they use this information in your WSDL file
    to form a SOAP request to the computer

4
Definitions
  • Definitions
  • - WSDL is an XML-based language used to
  • define Web Services and describe how to
  • access them.
  • - WSLD is an XML format for describing
  • network services as a set of endpoints
  • operating on messages containing either
  • document-oriented or procedure-oriented
  • information.

5
Working of WSDL

Figure 1. A client invoking a Web service.
6
Working of WSDL contd.


Figure 2. WSDL terminology used for describing
Web services.
7
Working of WSDL (with Java) contd.

8
Working of WSDL contd.
  • A client can invoke a web service using SOAP,
    HTTP GET/POST and MIME.
  • WSDL Document Structure
  • ltdefinitiongt - Root element
  • lttypesgt - Provides data type definitions
  • ltmessagegt - Represents the abstract definition of
    the data being transmitted
  • ltportTypegt - Defines a set of abstract operations
  • ltbindinggt - Specifies concrete protocol and data
    format specifications for the operations and
    messages defined by a particular portType
  • ltportgt - Specifies an address for a binding
  • ltservicegt - Used to aggregate a set of related
    ports.

9
Namespace
  • The XML namespace prefix are used to indicate the
    namespace of the element being defined
  • All WSDL elements belong to the WSDL namespace,
    defined as http//schemas.xmlsoap.org/wsdl/
  • For WSDL SOAP binding,
  • http//schemas.xmlsoap.org/wsdl/soap/
  • For WSDL HTTP GET and POST binding,
  • http//schemas.xmlsoap.org/wsdl/http/
  • For WSDL MIME binding,
  • http//schemas.xmlsoap.org/wsdl/mime/

10
Service
  • A service groups a set of related ports together
  • Let is consider an example of a Web Service and
    the GetTemperature method as an operation on that
    service.
  • ltdefinitions nameweatherservice
  • xmlnshttp//schemas.xmlsoap.org/wsdl/gt
  • lttypegt
  • ltxsdschema /gt
  • lt/typegt
  • ltservice nameWeatherService gt
  • lt/servicegt
  • lt/definitionsgt

11
Port
  • A port defines an individual endpoint by
    specifying a single address for a binding
  • ltport nameWeatherSoapPort bindingwsdlnsWeath
    erSoapBinding gt
  • ltsoapaddress
  • locationhttp//localhost/demos/wsdl/devx pert/
    weatherservice.asp /gt
  • lt/portgt
  • Each port has a unique name and a binding
    attribute
  • A web service may be accessible on many ports
  • A port MUST NOT specify more than one address
  • A port MUST NOT specify any binding information
    other than address information

12
Message
  • A message is protocol independent
  • There is an input or request message, which is
    sent from the client to the service, and there is
    a output or response message, which is sent back
    the opposite way
  • Each ltmessagegt element contains one or more
    ltpartgt elements.
  • ltpartgt element corresponds to the parameter or a
    return value in the RPC call.
  • The part name order reflects the order of the
    parameters in the RPC signature.

13
Message contd.
  • ltmessage nameWeather.GetTemperature gt
  • ltpart namezipcode typexsdstring /gt
  • ltpart namecelsius typexsdboolean /gt
  • lt/messagegt
  • ltmessage nameWeather.GetTemperatureResponse gt
  • ltpart nameResult typexsdfloat /gt
  • lt/messagegt

14
Operations and PortType
  • Operation defines which message is the input and
    which message is the output
  • A collection of all operations exposed bythe web
    service is called a portType
  • ltportType nameWeatherSoapPortgt
  • ltoperation nameGetTemperature
    parameterOrderzipcode celsiusgt
  • ltinput messagewsdlnsWeather.GetTemperature
    /gt
  • ltoutput messagewsdlnsWeather.GetTemperatureRe
    sponse /gt
  • lt/operationgt
  • lt! other operations ?
  • lt/portTypegt

15
Operations and PortType
  • WSDL has four transmission primitives that an
    endpoint can support
  • One-Way The endpoint receives a message
  • ltwsdlinputgt
  • Request-response The endpoint receives a
  • message and sends a correlated message
  • ltwsdlinputgt,ltwsdloutputgt,ltwsdlfaultgt
  • Solicit-response The endpoint sends a message
    and receives a correlated message
  • ltwsdloutputgt, ltwsdlinputgt, ltwsdlfaultgt
  • Notification The endpoint sends a message
  • ltwsdloutputgt

16
Binding
  • Binding mechanism is used to attach a specific
    protocol, data format or structure to an abstract
    message , operation or endpoint
  • Binding MUST specify exactly one protocol
  • Binding MUST NOT specify address information
  • Extensibility elements are commonly used to
    specify some technology specific binding
  • ltbinding nameWeatherSoapBinding
    typewsdlnsWeatherSoapPort gt
  • lt/bindinggt

17
SOAP Binding
  • ltsoapbindinggt - Signifies that the binding is
    bound to the SOAP protocol format Envelope,
    Header and Body
  • ltbinding gt
  • ltsoapbinding transporturi?
    Stylerpcdocument?gt
  • lt/bindinggt
  • ltsoapoperationgt - Provides information for the
    document as a whole
  • ltbinding gt
  • ltoperation gt
  • ltsoapoperation soapActionuri?
    Stylerpcdocument?gt
  • lt/operationgt
  • lt/bindinggt

18
SOAP Binding contd.
  • ltsoapbodygt - Specifies how the message parts
    appear inside the SOAP Body element
  • ltinputgt
  • ltsoapbody partsnmtokens? useliteralencoded
    ?
  • encodingStyleuri-list? Namespaceuri?gt
  • lt/inputgt
  • ltsoapfaultgt - Specifies the contents of the
    contents of the SOAP fault
  • ltfaultgt
  • ltsoapfault namenmtoken useliteralencoded
    encodingStyleuri-list? Namespaceuri?gt
  • lt/faultgt

19
SOAP binding contd.
  • ltsoapheadergt and ltsoapheaderfaultgt - Allow
    headers to be defined that are transmitted inside
    the Header element of the SOAP Envelope
  • ltinputgt
  • ltsoapheader messageqname partnmtoken
    useliteralencoded? encodingStyleuri-list?
    Namespaceuri?gt
  • ltsoapheaderfault messageqname partnmtoken
    useliteralencoded? encodingStyleuri-list?
    Namespaceuri?gt
  • lt/inputgt
  • ltsoapaddressgt - Used to give a port an address
    (a URI)
  • ltbinding gt
  • ltsoapaddress locationuri /gt
  • lt/bindinggt

20
HTTP GET POST Binding
  • lthttpaddressgt - Specifies the base URI for the
    port
  • lthttpbindinggt - Indicates that this binding uses
    the HTTP protocol
  • ltbinding gt
  • lthttpbinding verbnmtoken /gt
  • lt/bindinggt
  • lthttpoperationgt - has an attribute that
    specifies the relative URI for the operation
  • ltoperation gt
  • lthttpoperation locationuri /gt
  • lt/operationgt

21
HTTP GET POST Binding contd.
  • lthttpurlEncodedgt - Indicates that all the parts
    are encoded into the HTTP request URI using the
    standard URI-encoding rules
  • lthttpurlReplacementgt - Indicates that all the
    message parts are encoded into the HTTP request
    URI using a replacement algorithm

22
MIME Binding
  • ltmimecontentgt - Used if there is no additional
    information to convey about the format other than
    its MIME type string
  • ltmimecontent partnmtoken? Typestring? /gt
  • ltmimemultipartRelatedgt - Aggregates an arbitrary
    set of MIME formatted parts into one message
    using the MIME type multipart/related
  • ltmimemultipartRelatedgt
  • ltmimepartgt
  • ? mime element ?
  • lt/mimepartgt
  • lt/mimemultipartRelatedgt

23
MIME Binding contd.
  • ltsoapbodygt - When using the MIME binding with
    SOAP requests, it is legal to use the soapbody
    element as a MIME element. It indicates the
    content type is text/xml, and there is an
    enclosing SOAP Envelope
  • ltmimemimeXmlgt - Used to specify a concrete
    schema
  • ltmimemimeXml partnmtoken? /gt

24
References
  • World Wide Web Consortium
  • http//www.w3c.org/TR/wsdl
  • DevXpert
  • http//www.devxpert.com/tutors/wsdl/wsdlprint.asp
  • Sun Java Website
  • http//dcb.sun.com/practices/webservices/overview
    s/overview_wsdl.jsp
Write a Comment
User Comments (0)
About PowerShow.com