Web Services - School of Information Technology - Illinois State ...

insidiousbehaviorΑσφάλεια

3 Νοε 2013 (πριν από 3 χρόνια και 8 μήνες)

54 εμφανίσεις

Web Services

The Next Dimension of
Enterprise Computing

Dr. Billy B. L. Lim

School of Information Technology

Illinois State University

Outline


Web Services


What


Why


How


Who


When


Not

E
-
Commerce Scenarios


Objective
: Capitalize on the success of
e
-
commerce and build a web site to
sell books, CDs, and others


Scenario1


Build
BillyBooks.com
and compete
directly with the
Amazon.com
’s of the
world


Any chance of success here?

E
-
Commerce Scenarios


Scenario2

Source: Atkin, J., “Amazon Everywhere,” PC Magazine, 9/2003.

What are Web Services?


Some definitions / characteristics



“A Web service is a software system designed to
support interoperable
machine
-
to
-
machine
interaction over a network. It has an interface
described in a machine
-
processable format
(specifically
WSDL
). Other systems interact with
the Web service in a manner prescribed by its
description using
SOAP
-
messages, typically
conveyed using
HTTP

with an
XML

serialization
in conjunction with other Web
-
related standards.”
[W3C 2003]



What are Web Services?


definitions / characteristics (cont’d)


“Internet services available to ‘silicon
-
based life
forms” (as opposed to ones presented to
humans)” [Gosling ’02]


“Loosely coupled remote RPCs that would
replace today’s tightly coupled RPCs, which
require application
-

and protocol
-
specific API
connection. .. Uses XML, rather than C or C++,
to call procedures” [Gartner]


“Use protocols and data representations that are
internet friendly and ubiquitous”


“Next
-
generation service
-
oriented Internet
applications”



What are Web Services?


Allow for rich, dynamic communication
between applications


“Components for the Web”


Provide remote access to data and process


Reusable unit of business work


Remote access to business data


Help acquire “a homogenous view of a
heterogeneous reality”


“They probably won’t cost much, and they
really may change everything”


Web
Service

Why Web Services?
Observations


“I

couldn’t

make

DCOM

work
.

I

tried

and

failed,

again

and

again
.

But

I

can

make

a

Web

service

in

a

heartbeat
.







--

Jim

Gray,

Microsoft

Distinguished

Engineer





(Turing

Award

(~=

Nobel

Price

for

computing)

Winner)

Why Web Services?
Observations


.
NET’s

perspective


“The

power

of

the

XML

Web

Services

model

is

amazing
.

A

company

offering

an

online

electronic
-
payment

service

can

expose

its

service

to

partners,

so

that

they

can

deliver

it

as

part

of

their

own

offering



regardless

of

what

platform

they

are

using
.

An

airline

can

link

its

online

reservation

system

to

that

of

a

car
-
rental

partner,

so

travelers

can

book

a

car

at

the

same

time

they

book

a

flight
.

An

online

auction

company

can

notify

bidders

when

they

are

outbid

or

have

won

an

auction,

or

could

partner

with

other

firms

to

offer

alternative

shipping,

fulfillment

or

payment

options
.

XML

Web

services

help

your

business

break

free

of

its

boundaries
.





Bill Gates


Why Web Services?
Observations


Java’s perspective
(J2EE 1.4 Web Services
Framework)


Java API for XML


JAXP (Processing)


JAXM (Messaging)


JAXR (Registering)


JAX
-
RPC

Why Web Services?
Observations


Projected Revenues


380 millions in 2001 vs. 15.5 billions in 2005 (Source:
ZapThink, Inc. ’02)










IDC estimate: 1.6 billions in 2004 vs. 34 billions in
2007 (Source: South China Morning Post, May 28,
’02)


0
20000
40000
60000
80000
100000
120000
140000
160000
2001
2005
Revenues
Why Web Services?
Observations


“When do you expect your company to develop a
Web Services strategy?”

Source: InfoWorld Web Services Survey, July ‘01

now / 3
mos
4-6 mos
7-12
mos
>=12
mos
Never
???
Why Web Services?
Observations


The industry is aligned …



Broad industry initiative for Web services


Over 150 industry leaders


Interoperability across platforms, applications,

and languages

www.ws
-
i.org


Why Web Services?
Observations

Why Web Services?
Observations


Name change from “XML” to “XML & Web
Services”

Why Web Services?
Observations


Technology of the Year (InfoWorld ’02)

Why Web Services?


Interoperable


Easy to use


Reusable


Ubiquitous

Why Web Services?


eBusiness Paradox
[Clarke ’02]


“The promise of networked businesses will
not be realized until we can rapidly and
dynamically interoperate”


Why Web Services?


Need to interoperate within our enterprise
and
interoperate between enterprises


Why Web Services?


Traditionally, client and server need to
understand:


Implementation details


Service deployment


Security types and trusts


etc.


They must “speak” the same platform (COM
to COM, EJB to EJB, ORB to ORB, etc.)



Web Services are the result of:


Evolution of 3 generations of Web Applications

Source: Gusmano ‘02

OS

Services

Browsers

Servers

Data, Hosts

UI Logic

Biz Logic

1st Generation Web Applications

Source: Gusmano ‘02

OS

Services

Biz Logic

Tier

Rich Client

UI Logic

Servers

Data, Hosts

Richer

Browsers

2nd Generation Web Applications

Source: Gusmano ‘02

Standard

Browsers

Smarter

Clients

Smarter

Devices

Open Internet

Communications Protocols

(HTTP, SMTP, XML, SOAP)


Applications Become

Programmable Web Services

OS

Services

Biz

Tier Logic

Biz Logic
&
Web Service

OS

Services

Public Web

Services

Foundation

Services

Internal

Web Services

Servers

Data, Hosts

Other


Services

Next
Generation

Web Applications

Source: Gusmano ‘02

Web Services: Life Cycle

Service
Provider

(e.g.,
Brokerage House)

Service Registry

(e.g., IBM UDDI service)

Service
Requester

(e.g., XYZ
Financial Software)



bind to service



find service



publish
service (e.g.,
stock quote)

Life Cycle of a Web Service Execution (Registry, Lookup,
and Consumption)


What is Under the Hood?


XML


SOAP


WSDL


UDDI

Web Services: SOAP, WSDL, UDDI

An Overview of SOAP


Simple Object Access Protocol


Lightweight XML
-
based messaging format


Builds on


W3C XML standards


IETF HTTP standard


Works with:


Any operating system


Any programming language


Any platform

SOAP Message

SOAP Envelope

SOAP Header

SOAP Body

Message Name & Data

Headers

Protocol Headers


XML Encoded SOAP


Message Name and Data


<Body> contains SOAP


Message Name and Data

Individual headers


<Header> encloses headers


<Envelope> encloses payload


Standard Protocol (HTTP, SMTP, etc.)


and SOAP Headers


The complete SOAP Message

What is a SOAP Message?

POST /StockQuote HTTP/1.1

Host: www.stockquoteserver.com

Content
-
Type: text/xml

Content
-
Length: 323

SOAPAction: “www.stockquoteserver.com/GetLastTradePrice”


<?xml version=“1.0” encoding=“utf
-
8”?>


<SOAP
-
ENV:Envelope

xmlns:SOAP
-
ENV="http://schemas.xmlsoap.org/soap/envelope/"

SOAP
-
ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">



<SOAP
-
ENV:Body>


<m:GetLastTradePrice xmlns:m="Some
-
Namespace
-
URI">


<symbol>DIS</symbol>


</m:GetLastTradePrice>


</SOAP
-
ENV:Body>

</SOAP
-
ENV:Envelope>

Simple SOAP Request
(Using HTTP)

HTTP/1.1 200 OK

Content
-
Type: text/xml; charset=utf
-
8

Content
-
Length: nnnn


<?xml version=“1.0” encoding=“utf
-
8”?>


<SOAP
-
ENV:Envelope

xmlns:SOAP
-
ENV="http://schemas.xmlsoap.org/soap/envelope/"

SOAP
-
ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">


<SOAP
-
ENV:Body>


<m:GetLastTradePriceResponse


xmlns:m="Some
-
Namespace
-
URI">


<Price>24.5</Price>


</m:GetLastTradePriceResponse>


</SOAP
-
ENV:Body>

</SOAP
-
ENV:Envelope>

Simple SOAP Response

(Using HTTP)

WSDL


Web Services Description Language


Lets Web Services describe


what they are


where they can be found


how they should be used

<?xml version="1.0"?>

<serviceDescription>


<soap >


<service>


<addresses>


<address uri="http://localhost//HelloWorld.asmx"/>


</addresses>


<requestResponse name="HelloWorld" soapAction="http://tempuri.org/HelloWorld">


<request ref="s0:HelloWorld"/>


<response ref="s0:HelloWorldResult"/>


</requestResponse>


</service>


</soap>

</serviceDescription>

Simplified WSDL example

Complete one:
ISU Hello in Foreign Language Translator

UDDI


Universal Description, Discovery, and
Integration


Lets companies find publicly available
Web Services on the Internet or
corporate Intranets.

UDDI


Web services: Some possibilities


Financial information (e.g., stock quotes)


Sports information


Weather information


News


Delivery status


Tax and shipping calculations


Any data that is relevant to the client

How useful are Web Services?

Web Services: Demo


Examples:


College Admission Portal


http://138.87.169.87:9999/transcriptRequest/index.htm



Microsoft TerraService


http://terraserver.microsoft.net/default.aspx


Web Services: Who?


Who is doing this?


Vendors


Microsoft, IBM, Sun, Oracle, HP, BEA, etc.


.NET passport, Calendar, Alerts, Amazon Web
Services, etc.


Users/Consumers


Nordstrom, General Motors, etc.


List of public Web Services
http://www.xmethods.net/



Who should pay attention to this?


All of us!

Web Services: When?

Web Services: When?


Web Services will enter most organizations in three
distinct phases: [Source: IDC]


2002 (within the firewall)


Simplified app integration


Increased developer productivity


2004 (contained external users)


Simplified business
-
partner connectivity


Richer app functionality


Subscription
-
based services


2006 to 2008 (fully dynamic search and use)


Casual / ad
-
hoc use of services


New business models possible


Commoditization of software


Pervasive use in nontraditional devices

Web Services: The Not?


Challenges/Issues


Reliability / Consistency


Security


Authentication


Privacy


Billing


Reuse


Performance


Incompatible implementations of standards

Web Services: “Lingua Franca”

Source: Clarke ‘02

Related Project at ITK/ISU


College Admission Portal System
(CAPS)


Performance Comparisons of .NET
and Java
-
based Web Services


“A Day in the Life of Genie/Jini: A
Simulation of Service
-
Oriented
Architecture”

References


Clarke, N., “.Net & the J2EE: Web Services
-

Can we live together?,”
JavaOne
2002.


Gosling, J.,
Next
-
Generation Web Services Conference
, Keynote address,
Jan, 2002.


Gusmano, M., “Build Web Services with VB.NET,”
Microsoft Internet
Developer Group
, April 2001.


Appendix

Integrating Web Services into a
College Admission Portal System
(CAPS)

Billy Lim, Yan Sun

School of Information Technology

Illinois State University

Project Rationale


Problems


Online college admission application is
not complete (i.e., transcript is official and
thus can’t be submitted by students)


Solutions


Transmit official documents between
systems using Web Services


Add WS
-
Security

Project Architecture

XML

DB

DB

XML

JDBC

JDBC

HTTP

HTTP

CAPS
(College

Admission

Portal
System)

College 1

Transcript

Web

Service

College N

Transcript

Web

Service

B
-
to
-
B (College
-
to
-
College) interface via
Web services

Client (Student) interface via a
browser



Project Architecture (2)

Tomcat
4.1

JSP App
Server

Oracle 9i

Transcript

DB

New School

BEA
WebLogic
Server 8.1
beta

Access 2002

Student

DB

Old School

XML

WS Security

Applicant

Information Flow

Tomcat
4.1

JSP App
Server

New School

BEA
WebLogic
Server 8.1
beta

Old School

Applicant

1

2

3

4

5

6

7

Oracle 9i

Transcript

DB

Access 2002

Student

DB

Where are Web Services
Being Used Today?

Business applications of web
services


Source: [Schray 03]

Web Services are here now!


Danske Bank



XML web service for stock
quotes


Annie E. Casey Foundation



Used XML
web services to tie together various legacy
systems


Bear, Stearns, and Company



used XML
web services to extend stock order
capabilities to its internal developers

Web Services are here now!...


Nasdaq Stock Market, Inc.
-

using XML
Web services to deliver XBRL data directly to
the desktop


Centerpost

-

company’s new XML Web
service interface has decreased the time and
effort required to integrate new clients by an
average of 75 percent.


Allstate Insurance Co.



used web services
to integrate five existing policy management
systems

Source: http://www.microsoft.com/net/casestudies/

Examples of public web
services

Public Web Services


Microsoft MapPoint


http://staging.mappoint.net/standard
-
30/mappoint.wsdl


Google Search API


http://api.google.com/GoogleSearch.wsdl


Amazon.com


http://soap.amazon.com/schemas2/Amaz
onWebServices.wsdl

Public Web Services


MapPoint


GetMap


Find `find a location and get details


Google


doGoogleSearch


doSpellingSuggestion


doCachedPage


Amazon


KeywordSearchRequest


AsinSearchRequest ` like a ISBN search