service

w5.cs.uni.sb.de

service

Just-in-time Integration

An application retrieves only at

run-time, which web service

will be used finally.

The service is integrated

„just in time“.

Comparable with „late

binding“ in object-oriented

programming

Process is based on „Web

Service Architecture“

1. Registration

Service

Provider

Service

Registry

3. Binding

2. Search

Service

Consumer

© W. Wahlster


Technology Layers for Web Services

Discovery

Description

Packaging

Transport

Network

Modularization of tasks

Adapted to the Internet Stack

Discovery: find the right

description of a Web Service

Description: describe a Web

Service

Packaging: encode the data in a

generally understandable format

(=marshalling, serialization)

Transport: Data transport

between processes

Network: Communication

between machines in the net

© W. Wahlster


N-Tier Architectures

Distributed web applications are often realized

a so-called N-tier (N=2,3,4)

Each „Tier“ (Layer, Level) has its own task

Advantages

– Low complexity of the components

– Distribution of implementation tasks

– Flexibility in distributing the various tasks (thin

client)

– Easy maintenance (no client software, version

update)

– Scalability, Security

© W. Wahlster


3- und 4-Tier-Architectures

Tier 1:

Presentation

Tier 2:

Business Logic

Tier 3:

Data

Tier 1:

Presentation

Tier 2:

Web

Server

Business Logic

Tier 3:

Application

Server

Tier 4: Data

© W. Wahlster


Presentation Layer

User Interface

Often implemented in a web browser as a „thin

client“ without any application logic

Important function

– Pull user input

– Display output of the application on the server side

Important technologies

– HTML and WML, mostly forms

– Java Applets

© W. Wahlster


Business Logic Layer

In this layer most of the application logic is realized,

for example in e-commerce

- shopping basket functions

- and payment functions

this layer can be split physically for increased

security and scalability

– The web server, that forms the direct interface to the user

– The application server, which provides further services

(transactions, security)

Technologies: Servlets, JSP (Java Server Pages), ASP

(MS Active Server Pages), CORBA, EJB (Enterprise

Java Beans)

© W. Wahlster


The Data Layer

The layer is responsible for the core data of the

application, e.g. in e-commerce

- customer data

- product data

- orders

Typical implementations

Database systems like DB2, Oracle, SQL Server

Enterprise Resource Planning System like R/3

© W. Wahlster


Reasons for Service Descriptions

The caller must know how a service functions

in order to call it in a proper way

- standard solution: text description on a webpage -

- better solution: use a formal and machine

interpretable description based on a service

description language

normally the interfaces are being described;

thus: Interface Definition Language (IDL)

© W. Wahlster


The Role of Formal Descriptions in the Web

Service Architecture

This scheme functions

only with formal

descriptions

All three steps require

service descriptions:

– Registration advertises the

functions of the service

– Search is based on formally

defined properties

– Binding of the service used

the formal description for

ensuring proper calls and

execution

1. Registration

Service

Provider

Service

Registry

3. Binding

2. Search

Service

Consumer

© W. Wahlster


Goals of a Formal Description of Web Services

A formal description should answer the following

questions:

– Who is using this service? Who is offering is?

– What is offered? Service Interface

– Where is the service offered ? Servers, URLs

– Why is the service offered? Task, in most

cases only informal description

– How is the service offered Description of the

service interface

© W. Wahlster


WSDL = Web Service Description Language

WSDL is a „proposed standard“ of W3C.

Proposed by IBM, Microsoft and others

download: http://www.w3.org/TR/wsdl

WSDL like SOAP is an application of the XML

specification. A WSDL document is compliant

with a WSDL schema definition.

A WSDL specification answers three questions:

What is the service doing – which operations are

offered?

How is the service accessed – data formats,

messages?

Where is the service?

© W. Wahlster


WSDL Information Model

A WSDL specification consists of

– Abstract specification of message types

– Concrete Implementations of this specifications, i.e.

the actually available service

the description of the abstract functions is

based on the portType, the description of the

current implementation is based on the

binding element.

The binding is combined with an address, thus a

concrete terminal point is known, which allows

one to activitate the implementation.

© W. Wahlster


WSDL: Elements of the Language

portType: the abstract definition of an interface (like a Java

Interface)

message: s set of parameters, that are used by the operations

Typen: all data types, that are used in operations

binding: describes, how elements of an abstract interface are

mapped onto a concrete representation (coding schema, SOAP

over HTTP)

port: describes, how a binding is realized at a concrete terminal

service: a set of terminals

© W. Wahlster


Relations between WSDL Elements

part type

(abstract)) message

(concrete) message

concretion

by

includes

service

(abstract)

operation

(concrete)

message

Abstract

Interface

PortType

Concrete

Binding

concrete terminal (port)

© W. Wahlster


Structure of a WSDL Document

A service is a collection of

ports.

A port has an abstract

definition (portType) and

a concrete realization

(binding).

PortTypes a collections of

abstract operations.

Data Types


Messages


Interfaces


Services



© W. Wahlster


XML Schemata for Data Description

It should be clear for a service description, how the

exchanged data types are structures

In principle WSDL allows the use of any data

description language, but there is a clear preference

for XML schemata

Namespaces are being used, so that any schema

description can be applied inside the definitions.

Names of data types are used in a local context by

the introduction of namespaces.

© W. Wahlster


Abstract Service Description















© W. Wahlster


A SOAP-over-HTTP Binding








....



© W. Wahlster


Example: QA for stock market

A service is described, which receives a ticker

symbol as a query and replies with the current

value of the stocks referred to.

We describe the service in three files:

– The schema definition stockquote.xsd

– The operations in stockquote.wsdl

– The service in stockquoteservice.wsdl

© W. Wahlster


stockquote.xsd







stockquote.wsdl

















© W. Wahlster


stockquoteservice.wsdl











My first service






© W. Wahlster

More magazines by this user
Similar magazines