Você está na página 1de 9

G52IWS: Web Services

Julian Zappala

Contents
 Definitions of Web services
 Comparison of WWW/HTML and Web services
− Booking a trip
 Motivations for Web services
 Web Services and Standards
 Logical & Technical views of Web services

See “Developing Java Web Services”, chapter 2


2

1
Definitions of Web Services
 “Web services are loosely coupled software components
delivered over Internet standard technologies”
Gartner Research
June 15 2001

 Web Services mean many things to many people… a set of


standards which allow us to do things we could not do
before…The common themes are:-
− A departure from the web as a quasi-static information space to one in
which interactions are the primary model
− A use of HTTP, XML and other standards from the web architecture as
the building blocks
− A typical focus on enterprise wide and inter-enterprise operations
Tim Berners-Lee
2002
3

Booking a Trip – Using WWW/HTML


GET/POST Search Engine
request

Airline Reservation
Website

User with a Hotel Reservation


browser Website

communication:
HTTP over TCP/IP
Rental Car
Reservation
Website
Document
(usually HTML) 4

2
Booking a Trip – Using WWW/HTML
 Search engines index the WWW

 The user discovers web sites using a search


engine

 They then directly request things (“documents”,
e.g. a reservation page) from those web sites

Booking a Trip – Using Web


Services

Airline
Register Reservation
Find services System

Wireless services Travel


device Services
Registry

Hotel
Reservation
System
Invoke services

Service Requestor
Desktop Travel
Reservation
Services
Provider Rental Car
Reservation
System 6
After “Developing Java Web Services” Figure 2.1

3
Booking a Trip – Using Web
Services
 Travel reservation services provider exposes
travel services via a web service interfaces
 The services are registered with (described in)
the travel services registry
 A customer discovers the service(s) from the
registry (or other search engine)
 They then directly request things (“services”,
e.g. a reservation) from those web services

Motivations for Web Services


 Based on XML messaging
 Loosely coupled – abstracted service interfaces
 Use any common programming language
 Industry standard protocols (HTTP)
− Familiar and simple
− Internet scope
− Firewall compatibility
− Established mechanisms for scalability, robustness,
etc.
8

4
Motivations cont.
 Usable by many types of client
 Support a range of levels of functionality from
trivial to profound
 Supported by other middleware/platforms
− e.g. J2EE, CORBA, Microsoft .NET
 Support dynamically locatable and invocable
services
 Support cross-platform integration of business
applications over the internet
9

Core Web Service Standards


 Extensible Markup Language (XML)
− How to encode arbitrary information in document
form
 SOAP (formerly known as Simple Object Access Protocol)
− How to express web service requests and
responses in XML
 Web Services Definition Language (WSDL)
− Defines the operations, data types and faults that
characterise a web service

10

5
Core Web Service Standards (cont.)
 Universal Description, Discovery and
Integration (UDDI)
− How to describe, publish, store and retrieve
information about web services in registries
 WS-Security
− Various security-related facilities & definitions,
including XML Encryption, XML Key Management
System, XML Signature, ...

11

A Logical View of Web Services

Service
Broker
Register
Discover
service
Service

Service Service
Requestor Provider
Invoke service

12

6
A Technical View of Web Services
Web Services communicate
using

are described
by
is written XML is written
in in
WSDL SOAP

binds to
is discovered (is realised by)
through
is accessed
using
UDDI

13

Supporting standards
 TCP/IP
− The Internet Protocol suite for reliable global
communication
 DNS – the Domain Name System
− The standard Internet naming protocol
 HyperText Transfer Protocol (HTTP)
− A common “binding” for SOAP – to carry SOAP
requests and responses

14

7
Other related standards
 ebXML
− Complementary standards specific to e-business
 Web Services Choreography Interface
− Standard(s) for defining more complex patterns of
interaction between web services
 Business Transaction Protocol
− Support for web service distributed transactions

15

Challenges for web services


 Distributed transactions
− How are success, failure and recovery coordinated?
 Quality of Server (QoS)
− How can we ensure reliability and dependability?
− How can service-level agreements be enforced?
 Security
− This is all happening over the internet…
− Publicly exposed core business services and
operations!
16

8
Summary
 Web services are like WWW for computers
− Publishing “services” rather than documents
− In XML (for machines) rather than HTML (for
people)
− Using standard technologies (XML, HTTP, ...)
 Especially useful for
− Business-to-business integration and
interoperability
− Other loosely-coupled distributed applications
 Recommended reading for this lecture
17
− Developing Java Web Services: Chapter 2

Você também pode gostar