WSDL WSDL and UML - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

WSDL WSDL and UML

Description:

soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http' ... Airport flight slots. Appropriate. Inappropriate. A consideration for both ... – PowerPoint PPT presentation

Number of Views:67
Avg rating:3.0/5.0
Slides: 20
Provided by: fab67
Category:
Tags: uml | wsdl | airportstyle

less

Transcript and Presenter's Notes

Title: WSDL WSDL and UML


1
WSDL WSDL and UML
www.eu-egee.org
EGEE is a project funded by the European Union
under contract IST-2003-508833
2
UML to WSDL process
user
Client application
Servelet
Use case
interface
Class diagram
WSDL (interface Definition)
implementation
3
Starting with UML
  • Create a description of requirements in a use
    case diagram
  • Create a description of interactions in a
    sequence diagram
  • Create a description of the application (methods
    and attributes/variables) in a class diagram

4
Barnes Noble price client use case diagram
  • This is an extremely simple use case

5
bnclient class diagram
This is the simplest web service client
6
Mapping UML - WSDL
  • Attributes/variables become types
  • Methods become operations
  • Classes become portType

7
bnquote WSDL
lt?xml version"1.0"?gt ltdefinitions
name"BNQuoteService" targetNamespace"BNQuoteServ
ice.wsdl" xmlnsxsd"http//www.w3.org/2001/XMLSch
ema" xmlnssoap"http//schemas.xmlsoap.org/wsdl/s
oap/" xmlns"http//schemas.xmlsoap.org/wsdl/"
xmlnstns"BNQuoteService.wsdl" gt ltmessage
name"getPriceRequest"gt ltpart name"isbn"
type"xsdstring"/gt lt/messagegt ltmessage
name"getPriceResponse"gt ltpart name"return"
type"xsdfloat"/gt lt/messagegt ltportType
name"BNQuotePortType"gt ltoperation
name"getPrice"gt ltinput message"tnsgetPriceRe
quest" name"getPrice"/gt ltoutput
message"tnsgetPriceResponse" name"getPriceRespo
nse"/gt lt/operationgt lt/portTypegt
8
WSDL continued
ltbinding name"BNQuoteBinding" type"tnsBNQuotePo
rtType"gt ltsoapbinding style"rpc"
transport"http//schemas.xmlsoap.org/soap/http"/gt
ltoperation name"getPrice"gt ltsoapoperation
soapAction""/gt ltinput name"getPrice"gt ltso
apbody use"encoded" namespace"urnxmethods-BNPr
iceCheck" encodingStyle"http//schemas.xmlsoa
p.org/soap/encoding/"/gt lt/inputgt ltoutput
name"getPriceResponse"gt ltsoapbody
use"encoded" namespace"urnxmethods-BNPriceCheck
" encodingStyle"http//schemas.xmlsoap.org/so
ap/encoding/"/gt lt/outputgt lt/operationgt lt/bin
dinggt ltservice name"BNQuoteService"gt ltdocument
ationgtReturns price of a book at BN.com given an
ISBN numberlt/documentationgt ltport
name"BNQuotePort" binding"tnsBNQuoteBinding"gt
ltsoapaddress location"http//services.xmethods
.net80/soap/servlet/rpcrouter"/gt lt/portgt lt/ser
vicegt lt/definitionsgt
9
Mapping WSDL to client
ltmessage name"getPriceResponse"gt ltpart
name"return" type"xsdfloat"/gt lt/messagegt
ltportType name"BNQuotePortType"gt ltoperation
name"getPrice"gt ltinput message"tnsgetPriceRequ
est" name"getPrice"/gt ltoutput
message"tnsgetPriceResponse" name"getPriceRes
ponse"/gt lt/operationgt lt/portTypegt
ltmessage name"getPriceRequest"gt ltpart
name"isbn type"xsdstring"/gt lt/messagegt
10
Barnes Noble price example sequence diagram
  • This simple example is a prototype for all web
    services

11
Web services and state
  • Web services are generally described as
    stateless.
  • In practice this means that you cannot guarantee
    between interactions that you are interacting
    with the same instance of the servlet.
  • While web services are, in themselves, inherently
    stateless they can be made to behave in a
    state-full manner
  • By using a database back end
  • Using cookies
  • etc

12
Web services and state 2
  • One of the reasons that you may be interacting
    with different instances of a servlet lies in the
    use of web services factories.
  • In order to deal with many connections it is
    often useful to have a web services factory
    create instances for each connection rather than
    have a single listening service.

13
Design considerations with Web Services
  • Granularity
  • Traffic

14
Granularity
  • At what level in the design do we introduce
    services?
  • Too low and users are swamped in irrelevant
    detail
  • Too high and they cant access the details they
    need

15
Example
Inappropriate
Appropriate
Aircraft
Travel agent
Aircraft
Airport flight slots
Airport flight slots
Maintenance cycle
Maintenance cycle
A consideration for both services and operations
16
Traffic
Business
Yellow pages service
User
Address
17
Traffic 2 Messaging systems
  • Depends on the available (dedicated) bandwidth
  • Dont want services where very frequent calls are
    required (poss gt 1 per sec)
  • Dont want services to carry very large amounts
    of data regularly
  • Process locally
  • Pass encapsulated groups of data

18
Serialisation
  • Classes passed over web services are translated
    to XML in transport
  • This means that the object at the server is not
    necessarily identical to the object at the client.

19
Summary
  • Attributes/variables become types
  • Methods become operations
  • Classes become portType
  • Appropriate granularity
  • Awareness of network traffic
  • Web services objects are serialised as XML
Write a Comment
User Comments (0)
About PowerShow.com