51
1 Architecture Working Draft @@ @@@ 2002 學學 : 學學學 學學學學 : 學學學 學學 學學學學 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris, IBM Eric Newcomer, Iona David Orchard, BEA Systems http://www.w3.org/TR/wd-ws-arch

1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

Embed Size (px)

Citation preview

Page 1: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

1

Web Service ArchitectureWorking Draft @@ @@@ 2002

學生 : 鄭偉豪 指導老師 : 葉慶隆 教授報告日期 :2003/03/20

Editors:

Michael Champion, Software AG

Chris Ferris, IBM

Eric Newcomer, Iona

David Orchard, BEA Systems

http://www.w3.org/TR/wd-ws-arch

Page 2: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

2

Introduction Web services provide a standard means of communication

among different software applications,running on a variety of platforms and/or frameworks

The Web services reference architecture

1. identifies the functional components,

2. defines the relationships among those components,

3. and establishes a set of constraints upon each to effect the desired properties of the overall architecture.

Page 3: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

3

The Need for an Architecture The generalized term "Web services" does not currently

describe a coherent or necessarily consistent set of technologies, architectures, or even visions.

What we think of as "Web services", including:1. "Distributed Objects" or "Application Integration" 2. EDI / B2B3. The World Wide Web itself The Web has proven enormously popular, scalable, and

interoperable, but it too presents many challenges -- reliability, security, database-level transactions

Page 4: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

4

2 What is a Web service? Web service is a software system identified by a URI,

whose public interfaces and bindings are defined and described using XML

Its definition can be discovered by other software systems. These systems may then interact with the Web service in a manner prescribed by its definition, using XML based messages conveyed by internet protocols

Page 5: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

5

3 Architecture Overview 3.1 Basic Architecture 3.2 Extended Web Services Architecture

Page 6: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

6

3.1 Basic Architecture(Cont) The basic architecture includes Web services

technologies capable of: 1. Exchanging messages2. Describing Web services3. Publishing and discovering Web service

descriptions The basic Web service architecture models the

interactions between agents performing any of three roles

Page 7: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

7

3.1 Basic Architecture(Cont) Requesters and providers interact using one or more mes

sage exchange patterns (MEPs) that define the sequence of one or more messages exchanged between them.(data type,structure information,identifies the MEP)

Page 8: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

8

3.1 Basic Architecture(Cont) Software agents in the basic architecture can take on

one or all of the following roles:

1. Service requester

2. Service provider

3. Discovery agency

Page 9: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

9

3.1 Basic Architecture(Cont) Service Oriented Architecture

The figure above illustrates the basic Web services architecture

Page 10: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

10

3.1 Basic Architecture(Cont) A message is defined as a construct that can include zero

or more headers, an envelope, data within the envelope and data external to the envelope.

The header part of a message can include information pertinent to extended Web services functionality,such as security, transaction context, orchestration information, or message routing information.

The data part of a message contains the message content or data.

Page 11: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

11

3.1 Basic Architecture Service Oriented Architecture

The figure above illustrates the relationships between requesters, providers, services, descriptions, and discovery services in the case where agents take on both requester and provider roles

Page 12: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

12

3.1.1 Components The Service: A web service is a software module

deployed on network accessible platform provided by service provider

The Service Description: The service description contains the details of the interface and implementation of the service. This includes its data types, operations, binding information, and network location

Page 13: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

13

3.1.2 Roles Service Provider: From a business perspective, this is the

owner of the service. Service Requestor: From a business perspective, this is

the business that requires certain function to be satisfied Discovery Agency: This is a searchable set of service

descriptions .

1. A discovery agency can support both the pattern where it has descriptions sent to it and where the agency actively inspects public providers for descriptions

Page 14: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

14

3.1.3 Operations In order for an application to take advantage of Web

services, three behaviors must take place

1. Publish

2. Find

3. Interact

Page 15: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

15

3.2 Extended Web Services Architecture

The extended Web services architecture incorporates additional features and functionality by extending the technologies and components defined within the basic Web services architecture.

Page 16: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

16

3.2.1 Features Features are ..... A Feature is specified in the abstract, and is

realized through one or more bindings, Message Exchange Patterns, or Modules..

Here is a partial list of Features1. Message exchange pattern(MEP)2. Caching3. Message integrity4. Message routing 5. Asynchronous messaging6. ....

Page 17: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

17

3.2.1.1 Packaging For some applications, a purely XML-based

representation of the payload is awkward or inefficient The most common packaging tactic in such cases is to

introduce a multipart representation which carries the SOAP envelope and its related data

Page 18: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

18

3.2.1.2 Transactions The fundamental characteristic of a transaction is the ability

to join multiple actions into the same unit of work The transactional unit of work is responsible for ensuring

that any state changes performed by participating Web services are either made permanent or undone.

Two major cases of context management need to be addressed:

1. Where communication sessions (or conversations) are available to maintain shared state

2. Where communication sessions (or conversations) are not available to maintain shared state

Page 19: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

19

3.2.1.3 Publish/Subscribe There are a number of mechanisms that can be used to

support the distribution of messages

1. a publisher may only support one subscriber, in which case simple one-way or sync request/response may be used

2. When multiple publishers and subscribers are allowed, message distribution may occur at the protocol level

3. though an intermediary distribution service (e.g. a web service) that takes on the responsibility of distributing the messages to interested parties

Page 20: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

20

3.2.1.4 Choreography(Cont) Choreographies define how multiple web services are

used together, specifying the linkages and usage patterns involved.

A choreography definition describes the sequence and conditions which control how the interactions occur.

Page 21: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

21

3.2.1.4 Choreography Example uses of choreography definitions include:

1. Service Composition

2. Workflow

3. Linking businesses through Web Services A standard choreography definition language provides

significant benefits

1. Complements WSDL

2. Standardized choreographies

Page 22: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

22

3.2.1.5 Semantics Semantics in web services provide formal documentation

of meaning. 1.Rights and obligations of parties 2.Who is doing what to whom 3.Effect of invoking services Preconditions,consequences, Expected effects of actions 4.Notable events 5.Definition of terms references to external ontologies local definitions specific to the agreement

Page 23: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

23

3.2.3 Diagrammatic representation of features

Page 24: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

24

3.2.4 Flows

Service Oriented Architecture Derivate Patterns Peer to Peer

Page 25: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

25

3.2.4 Flows

Service Oriented Architecture Derivate Patterns Direct interaction

Page 26: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

26

3.2.4 Flows

Service Oriented Architecture Derivate Patterns intermediary

Page 27: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

27

3.2.4 Flows

NEW Service Oriented Architecture Derivate Patterns one way message

Page 28: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

28

4 Web Services Stacks To ensure interoperability when performing the publish,

find and bind operations expressed in the Service Oriented Architecture (SOA) diagram; conceptual and technical standards must be defined for each role and type of interaction

This section will explore each of roles and interactions in order identify each relevant stack of technologies

Page 29: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

29

4.1 Wire "Stack" The wire stack encapsulates the concepts and

technologies dealing with the actual physical exchange of information between any of the roles in the SOA diagram.

This includes the variety network transport, message packaging and message extensions that may be utilized to facilitate data exchange

Page 30: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

30

Wire

Page 31: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

31

4.1.1 Transport Web services that are publicly available on the Internet

use commonly deployed network protocols. Because of its ubiquity, HTTP is the de facto standard network protocol for Internet-available web services.

Other Internet protocols may be supported including SMTP and FTP.

Page 32: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

32

4.1.2 Packaging Packaging, represents the technologies that may be

used to package information being exchanged SOAP consists of four fundamental components

1. an envelop

2. a set of encoding rules

3. a convention for representing remote procedure calls (RPC) and responses

4. a set of rules for using SOAP with HTTP

Page 33: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

33

4.1.2 Packaging SOAP is currently the de facto standard for XML

messaging for a number of reasons.1. SOAP is relatively simple, defining a thin layer that

builds on top of existing network technologies such as HTTP

2. SOAP is flexible and extensible3. SOAP is based on XML. 4. SOAP enjoys broad industry and developer

community support

Page 34: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

34

4.1.3 Extensions Extensions provides a framework that allows

additional information to be attached to Web service messages representing a variety of additional concerns; such as context, routing, policy, etc.

Page 35: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

35

4.2 XML Messaging with SOAP(cont)

Page 36: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

36

4.2 XML Messaging with SOAP Application integration with SOAP can be achieved by

using four basic steps

1. A service requestor’s application creates a SOAP message.

2. The SOAP runtime is responsible for converting the XML Message into programming language specific objects

3. The web service is responsible for processing the request message and formulating a response

4. The response message is received by the networking infrastructure on the service requestor’s node

Page 37: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

37

4.2.1 Interactions

1. One way: Message sent from requestor to provider. Provider may or may not return a response

2. Conversational: Requester and Provider exchange multiple messages.Can be defined by choreography language

3. Many-to-Many: Requester sends message to many providers. Or, service provider responds to many requestors. Can be defined by choreography language

Page 38: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

38

4.3 Description "Stack“

Page 39: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

39

4.3.1 Descriptions Applying to a Particular Web Service

Page 40: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

40

4.3.1.1 Interface A service interface definition is an abstract or reusable ser

vice definition that may be instantiated and referenced by multiple service implementation definitions.

Service interfaces may be defined by industry standards organizations, such as RosettaNet or HL7 for the health industry.

The service interface contains elements that comprise the reusable portion of the service description:binding, portType, message and type elements

Page 41: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

41

4.3.1.2 Implementation The service implementation definition describes how a

particular service interface is implemented by a given service provider. also describes its location so that a requester can interact with it.

Page 42: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

42

4.3.1.3 Policy Policy for Web services consists of facts, or assertions,

and rules that apply to a particular Web service. The policy description layer is where the additional

description necessary to specify the business context, qualities of service, security requirements and offerings, and management requirements.

Page 43: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

43

4.3.1.4 Presentation This description could be used to render the service on a

variety of devices including phones, PDAs, and systems.

Page 44: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

44

4.4 Discovery Agencies "Stack"

Page 45: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

45

4.4 Discovery Agencies "Stack"

A web service cannot be discovered if it has not been published, service discovery depends upon service publication.

Page 46: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

46

4.4.1 Service Publication A service description can be published using a variety of

mechanisms. These various mechanisms provide different capabilities depending on how dynamic the application using the service is intended to be.

Page 47: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

47

4.4.1.2 Publishing Service Descriptions

Internal Enterprise Application UDDI registry Portal UDDI registry Partner Catalog UDDI registry e-Marketplace UDDI Business Registry UDDI registry

Page 48: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

48

4.4.2 Service Discovery

-- Acquiring Service Descriptions Service requestors can retrieve a service description at

design time or runtime from a Web page (URL), a service description repository, a simple service registry or a UDDI registry.

Page 49: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

49

4.5 Overarching Concerns

Page 50: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

50

4.5 Realization in Web Services Architecture

Page 51: 1 Web Service Architecture Working Draft @@ @@@ 2002 學生 : 鄭偉豪 指導老師 : 葉慶隆 教授 報告日期 :2003/03/20 Editors: Michael Champion, Software AG Chris Ferris,

51

4.6 The Complete Web Services "Stack"