Web services introduction overview - uml.edu S., “Unraveling the Web services web: an introduction...
Transcript of Web services introduction overview - uml.edu S., “Unraveling the Web services web: an introduction...
1
I V P R 1© Copyright 2003 Haim Levkowitz
Web Services: Introduction and overview
I V P R 2© Copyright 2003 Haim Levkowitz
Outline
• Introduction and overview• Web Services model• Components / protocols …• … In the Web Services model• Web Services protocol stack• Examples
2
I V P R 3© Copyright 2003 Haim Levkowitz
Introduction and overview• Services offered via the Web• Typical Web services scenario:
• Business application sends request to service at given URL• Using SOAP (protocol) over HTTP
• Service • Receives request• Processes it• Returns response
I V P R 4© Copyright 2003 Haim Levkowitz
Introduction and overview• Common example (simple)
• Stock quote request• Current price of specified stock
• Response: stock price • One of simplest forms of Web service
• Request filled almost immediately• Request and response parts of same
method call
3
I V P R 5© Copyright 2003 Haim Levkowitz
Another example• Service: map out efficient route for delivery
of goods• Business sends request
• Containing delivery destinations• Service processes
• Determine most cost-effective delivery route
• Time to return response depends on complexity of routing
• è Response probably sent as operation is separate from request
I V P R 6© Copyright 2003 Haim Levkowitz
Predominantly B-to-B
• Enterprise can be provider & consumer • E.g., wholesale distributor of spices
• Consumer role: check availability of vanilla beans
• Provider role: supply prospective customers different vendors' prices for vanilla beans
4
I V P R 7© Copyright 2003 Haim Levkowitz
Web application• Dynamic extension of Web server• Two types:
• Presentation-oriented:• Generate dynamic Web pages w/various markup
• HTML, XML, …• Respond to requests
• Service-oriented:• Implement endpoint of Web service• Often invoked by presentation-oriented applications
I V P R 8© Copyright 2003 Haim Levkowitz
Web Services
• Based on XML, lots of Java• Still under development
• Lots of “buzz”• CACM, Oct. 2003• IEEE Computer, Oct. 2003
5
I V P R 9© Copyright 2003 Haim Levkowitz
Web Services model
Service Provider
Service RegistryService Requestor
Invoke / Bind
Query / Find
Publish
I V P R 10© Copyright 2003 Haim Levkowitz
Components / protocols …• All XML-based• SOAP: Simple Object Access Protocol
• Communication documents• WSDL: Web Service Description Language
• Service description• UDDI: Universal Description, Discovery and
Integration• Service discovery
6
I V P R 11© Copyright 2003 Haim Levkowitz
InternetInternet
… In the Web Services model
Service Provider
Service Registry & Directory
Service Requestor / Client
3. Invoke / Bind (SOAP + WSDL)
2. Query / Find (UDDI + WSDL )
1. Publish (WSDL)
I V P R 12© Copyright 2003 Haim Levkowitz
Communication (SOAP)
• Exchange documents• In SOAP
• XML
7
I V P R 13© Copyright 2003 Haim Levkowitz
Service description (WSDL)
• Tell the outside world:• Interface definition: what kinds of
documents it exchanges• URI – address: where it “lives” • Binding: which transport protocols it can
use to exchange documents• In WSDL
I V P R 14© Copyright 2003 Haim Levkowitz
Service registry & discovery (UDDI)• UDDI deals with registering and discovery of
Web services• UDDI registry is the “yellow pages” to discover
Web services
8
I V P R 15© Copyright 2003 Haim Levkowitz
Web Services protocol stack
Transport protocols(HTTP, HTTPS, SMTP, etc.)
XML
SOAP
UDDI
I V P R 16© Copyright 2003 Haim Levkowitz
SOAP
• Communications protocol• Initially created by Microsoft• Provides platform and language
independence
9
I V P R 17© Copyright 2003 Haim Levkowitz
SOAP transaction
(from Oracle)
Client SOAP Supplier SOAPTransport
I V P R 18© Copyright 2003 Haim Levkowitz
Structure of SOAP message<SOAP:Envelope xmlns:SOAP=
"http://schemas.xmlsoap.org/soap/envelope/"><SOAP:Header>
<!-- content of header goes here --></SOAP:Header><SOAP:Body>
<!-- content of body goes here --></SOAP:Body>
</SOAP:Envelope> Envelope features child elements that contain message header and body elements
10
I V P R 19© Copyright 2003 Haim Levkowitz
SOAP message containing an e-ticket
SOAPAction header indicates message’s purpose. In real-world scenario, message would contain additional information, including sender’s credentials
I V P R 20© Copyright 2003 Haim Levkowitz
SOAP RPC call
To find out if flight is on time, Joesends string containing airline’s name and integer with flight number
11
I V P R 21© Copyright 2003 Haim Levkowitz
SOAP RPC response
travel service responds to Joe’s request with structured value containing subvalues for gate number + flight status
I V P R 22© Copyright 2003 Haim Levkowitz
WSDL
• XML based• Used to describe and expose Web
Services• Developed by IBM and Microsoft • WSDL document provides Abstract
Description and Concrete Binding Information
12
I V P R 23© Copyright 2003 Haim Levkowitz
WSDL doc structure
(from Oracle)
I V P R 24© Copyright 2003 Haim Levkowitz
WSDL – Abstract Description• 3 main components
• Vocabulary• Message• Interaction
13
I V P R 25© Copyright 2003 Haim Levkowitz
WSDL –Abstract Description
string and intdata types, def’din XSD, + 2 other datatypesdef’d in external schema:FlightInfoTypeand Ticket, (imported earlier in WSDL file)
I V P R 26© Copyright 2003 Haim Levkowitz
WSDL – Concrete Binding Information• 3 pieces
• What communication protocol:• SOAP over HTTP?
• How to accomplish service interactions• Individual service interactions over this protocol
• Where to terminate communication• The network address
14
I V P R 27© Copyright 2003 Haim Levkowitz
WSDL –Concrete Binding Information
I V P R 28© Copyright 2003 Haim Levkowitz
15
I V P R 29© Copyright 2003 Haim Levkowitz
UDDI
• Service discovery• Common repository to advertise• Provides 2 basic specifications
• Organizing structure• Categorization
I V P R 30© Copyright 2003 Haim Levkowitz
UDDI – Organizing Structure• Encodes 3 types of information
• “white pages” (name, addr)• “yellow pages” (categorized)• “green pages” (tech info)
• Organized around two entities• businessEntity• businessService
16
I V P R 31© Copyright 2003 Haim Levkowitz
SimplifiedbusinessEntitystructure
I V P R 32© Copyright 2003 Haim Levkowitz
17
I V P R 33© Copyright 2003 Haim Levkowitz
SimplifiedbusinessServicestructure
I V P R 34© Copyright 2003 Haim Levkowitz
18
I V P R 35© Copyright 2003 Haim Levkowitz
UDDI – Categorization
• Taxonomy and tModels• 3 standard taxonomies
• North American Industry Classification System (NAICS)
• Universal Standard Products and Services Code System (UNSPSC)
• International Organization for Standardization Geographic taxonomy (ISO 3166)
I V P R 36© Copyright 2003 Haim Levkowitz
SampletModeldefinition
19
I V P R 37© Copyright 2003 Haim Levkowitz
Current Web Services Directories• UDDI business registry (UBR)• www.uddi.org• www.xmethods.net (~250)• www.salcentral.com (~540)
I V P R 38© Copyright 2003 Haim Levkowitz
What’s Next?
• Security• SOAP Security Extensions proposal
• Reliability• “Reliable SOAP” standard?
• Quality-of-service (QoS)• Popular = heavy loads
20
I V P R 39© Copyright 2003 Haim Levkowitz
Summary
• All based XML• All still under development• SOAP + WSDL + UDDI• Security, Reliability, QoS next
I V P R 40© Copyright 2003 Haim Levkowitz
References• Curbera, F.; Duftler, M.; Khalaf, R.; Nagy, W.; Mukhi, N.;
Weerawarana, S., “Unraveling the Web services web: an introduction to SOAP, WSDL, and UDDI”, IEEE Internet Computing Volume: 6, Issue: 2, March-April 2002, pp. 86 -93
• H. M. Deitel et al., Web Services A Technical Introduction (New Jersey, Prentice Hall, 2003)
• S. Short, Building XML Web Services for the Microsoft .NET Platform (Washington, Microsoft Press, 2002)
• Clark, D., Next-generation web services, IEEE Internet Computing Volume: 6, Issue: 2, March-April 2002, pp. 12 -14
• Ingham, D.B.; Shrivastava, S.K.; Panzieri, F., Constructing dependable Web services, IEEE Internet Computing Volume: 4, Issue: 1, Jan.-Feb. 2000, pp. 25 -33.