• Tidak ada hasil yang ditemukan

Slides for Chapter 19 Web Services - Chapter 19 slides

N/A
N/A
Protected

Academic year: 2019

Membagikan "Slides for Chapter 19 Web Services - Chapter 19 slides"

Copied!
21
0
0

Teks penuh

(1)

Slides for Chapter 19

Web Services

From

Coulouris, Dollimore and Kindberg

Distributed Systems:

(2)

Figure 19.1 Web services infrastructure and components

Security

Service descriptions (in WSDL)

Applications

Directory service

Web Services

XML

Choreography

SOAP

(3)

Figure 19.2 The ‘travel agent service’ combines other web services

hotel booking

a

Travel Agent

flight

booking

a

hire car booking

a

Service

Client

flight booking

b

hotel booking

b

(4)

Figure 19.3 SOAP message in an envelope

envelope

header

body

header element

body element

header element

(5)

Figure 19.4 Example of a simple request without headers

m:exchange

env:envelope

xmlns:env =namespace URI for SOAP envelopes

m:arg1

env:body

xmlns:m = namespace URI of the service description

Hello

m:arg2

World

(6)

Figure 19.5 Example of a reply corresponding to the request in Figure 19.4

env:envel

ope

xmlns:env = namespace URI for SOAP envelope

m:res1

env:body

xmlns:m = namespace URI for the service description

m:res2

World

m:exchangeResponse

(7)

Figure 19.6 Use of HTTP POST Request in SOAP client-server

(8)

Figure 19.7 Java web service interface ShapeList

import java.rmi.*;

public interface ShapeList extends Remote {

int newShape(GraphicalObject g) throws RemoteException;

int numberOfShapes()throws RemoteException;

int getVersion() throws RemoteException;

int getGOVersion(int i)throws RemoteException;

(9)

Figure 19.8 Java implementation of the ShapeList server

import java.util.Vector;

public class ShapeListImpl implements ShapeList {

private Vector theList = new Vector();

private int version = 0;

private Vector theVersions = new Vector();

public int newShape(GraphicalObject g) throws RemoteException{

version++;

theList.addElement(g);

theVersions.addElement(new Integer(version));

return theList.size();

}

public int numberOfShapes(){}

public int getVersion() {}

public int getGOVersion(int i){ }

(10)

Figure 19.9 Java implementation of the ShapeList client

package staticstub;

import javax.xml.rpc.Stub;

public class ShapeListClient {

public static void main(String[] args) { /* pass URL of service */

try {

Stub proxy = createProxy();

proxy._setProperty

(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY, args[0]);

ShapeList aShapeList = (ShapeList)proxy;

GraphicalObject g = aShapeList.getAllState(0);

} catch (Exception ex) { ex.printStackTrace(); }

}

private static Stub createProxy() {

return

(Stub) (new MyShapeListService_Impl().getShapeListPort());

}

(11)

Figure 19.10 The main elements in a WSDL description

abstract

concrete

how

where

defnnitnions

types

target namespace

ninterface

bnindnings

servnices

message

(12)

Figure 19.11 WSDL request and reply messages for the newShape operation

message

name =

ShapeList_newShape

"

"

type =

ns:GraphicalObject

"

"

part

name

="GraphnicalObject_1"

tns

target namespace

xsd

XML schema defnitions

message

name =

ShapeList_newShapeResponse

"

"

part

name=

"

result

"

(13)

Figure 19.12 Message exchange patterns for WSDL operations

Name

In-Out

In-Only

Robust In-Only

Out-In

Out-Only

Robust Out-Only

Client

Server

Delivery

Fault message

Request

Reply

may replace

Reply

Request

no fault message

Request

guaranteed

may be sent

Reply

Request

may replace

Reply

Request

no fault message

(14)

Figure 19.13 WSDL operation newShape

operatnion

name =

newShape

"

"

ninput

message =

tns:ShapeList_newShape

"

"

output

message =

"tns:ShapeList_newShapeResponse"

pattern = In-Out

tns – target namespace

xsd – XML schema defnitions

(15)

Figure 19.14 SOAP binding and service definitions

soap:bnindning

transport = URI

bnindning

style=

"

rpc

"

endponint

servnice

name =

binding =

tns:ShapeListBinding

"

"

soap:address

location = service URI

name =

MyShapeListService

"

"

name =

ShapeListPort

"

"

for schemas for soap/http

the service URI is:

operatnion

name=

newShape

"

"

ninput

soap:body

encoding, namespace

soap:body

encoding, namespace

output

(16)

Figure 19.15 The main UDDI data structures

about the publisher

tModel

busninessServnices

human readable

service descriptions

key

key

family of services

human readable

(17)

Figure 19.16 Algorithms required for XML signature

Type of algorithm

Name of algorithm

Required

reference

Message digest

SHA-1

Required

Section 7.4.3

Encoding

base64

Required

[Freed and Borenstein 1996]

Signature

DSA with SHA-1

Required

[NIST 1994]

(asymmetric)

RSA with SHA-1

Recommended

Section 7.3.2

MAC signature

(symmetric)

HMAC-SHA-1

Required

Section 7.4.2 and Krawczyk

et al.

[1997]

(18)

Figure 19.17 Algorithms required for encryption(the algorithms in Figure

19.16 are also required)

Type of algorithm Name of algorithm

Required

reference

Block cipher

TRIPLEDES,

AES 128

required

Section 7.3.1

AES-192

optional

Encoding

base64

required

[Freed and Borenstein 1996]

Key transport

RSA-v1.5,

RSA-OAEP

required

Section 7.3.2

[Kaliski and Staddon 1998]

Symmetric key

wrap (signature

by shared key)

TRIPLEDES

KeyWrap,

AES-128 KeyWrap,

AES 256KeyWrap

required

[Housley 2002]

AES-192 KeyWrap

optional

(19)

Figure 19.18 Travel agent scenario

1. The client asks the travel agent service for information about a set of services; for example, fights, car

hire and hotel bookings.

2. The travel agent service collects prices and availability information and sends it to the client, which

chooses one of the following on behalf of the user:

(a) refne the query, possibly involving more providers to get more information, then repeat step 2;

(b) make reservations;

(c) quit.

3. The client requests a reservation and the travel agent service checks availability.

4. Either all are available;

or for services that are not available;

either alternatives are ofered to the client who goes back to step 3;

or the client goes back to step 1.

5. Take deposit.

6. Give the client a reservation number as a confrmation.

(20)

Figure 19.19 Open grid services architecture

Application specfc grid services

web services

application specifc

OGSI

services: naming, service data (metadata)

OGSA

services: directory, management, security

service creation and deletion, fault model, service groups

e.g.

GrnidServnice

interfaces

e.g. astronomy, biomedical informatics, high-energy physics

Factory

(21)

Figure 19.20 A selection of the grid projects presented in Foster & Kesselman[2004]

Description of the project

Reference

1. Aircraft engine maintenance using fault histories and

sensors for predictive diagnostics

www.cs.york.ac.uk/dame

2. Telepresence for predicting the efects of

earthquakes on buildings, using simulations and test sites

www.neesgrid.org

3. Bio-medical informatics network providing

researchers with access to experiments and visualizations of results

nbcr.sdsc.edu

4. Analysis of data from the CMS high energy particle

detector at CERN by physicists world-wide over 15 years

www.uscms.org

5. Testing the efects of candidate drug molecules for

their efect on the activity of a protein, by performing parallel

computations using idle desktop computers

[Taufer et al. 2003]

[Chien 2004

6. Use of the Sun Grid Engine to enhance aerial

photographs by using spare capacity on a cluster of web servers

www.globexplorer.com

7. The butterfy Grid supports multiplayer games for

very large numbers of players on the internet over the Globus toolkit

www.butterfy.net

8. The Access Grid supports the needs of small group

Gambar

Figure 19.2 The ‘travel agent service’ combines other web services
Figure 19.3 SOAP message in an envelope
Figure 19.4 Example of a simple request without headers
Figure 19.5 Example of a reply corresponding to the request in Figure 19.4
+4

Referensi

Dokumen terkait

Takdir yang masih bisa berubah dengan cara usaha/ikhtiar Contoh = Bodoh menjadi pandai dengan cara belajar rajin, Miskin menjadi kaya dengan bekerja keras,..

Mengangkat saudara-saudarayang namanya tercantum dalam lampiran keputusan ini sebagai I(egiatan Seminar Nasional FMIPA Universitas Negeri Yogyakarta TahLrn 2013 Panitia

Rumusan masalah pada penelitian ini adalah : Apakah Efikasi Diri dan Lingkungan Keluarga Berpengaruh Terhadap Minat Berwirausaha Mahasiswa Program Studi Ilmu Administrasi

1 H.Abdurrahman, “Pembangunan Berkelanjutan dalam Pengelolaan Sumber Daya Alam Indonesia”, Makalah Seminar Pembangunan Hukum Nasional VIII, Tema Penegakkan Hukum dalam Era

Since Cambodia’s community forestry regulations do not cover in detail timber harvesting for commercial purposes in Cambodia, the FA required the forest concession system manuals –

Nokta-i imâlî : Kuzey noktası: Kuzey do ğ rultusunun ufuk üzerinde gö ğ ü del- di ğ i nokta. Daire nısf el-nehâr. Nokta-i tulû: bkz. Nokta-i ma rık.. Ortalama anomali:

melakukan penelitian yang berjudul “ Pengaruh Environmental Performance terhadap Economic Performance dengan Corporate Social Responsibility Sebagai Variabel

• Bertanggung jawab dan menunjukkan kepemilikan karakter iman, cerdas, mandiri, jujur, peduli, dan tangguh dalam penyelesaian tugas, kuis, dan tes yang terkait