1
Introduction to Web Services
- Asst. Prof. Dr. Kanda Runapongsa Saikaew
Introduction to Web Services Asst. Prof. Dr. Kanda Runapongsa - - PowerPoint PPT Presentation
Introduction to Web Services Asst. Prof. Dr. Kanda Runapongsa Saikaew (krunapon@kku.ac.th) Department of Computer Engineering Khon Kaen University 1 Agenda Web Technologies What is a Web Service? Why Web Services? Web Services
1
2
3
Application delivered to users from a web
Users usually access Web application via
Human interaction with programs HTML forms Web programming
4
HTML
Client Side
Serve ver Side
Static Web Dynamic Web
5
HTML Web Appli licat catio ion Web User
6
Appli licat ation ion
Web Service ice XML Web
7
Web Application
HTML User-to-program
interaction
Static integration of
components
Monolithic service
Web Services
XML Program-to-program
interaction
Dynamic integration
Service aggregation
8
9
Browse the Web Program the Internet
Standard
Programmability
Presentation Connectivity
10
This is not certain, but the term Web
The main evidence for this is the chaotic
11
By Adam Bosworth
12
Web Services are enabling technologies
By HEKATE (Higher Education Knowledge
and Technology Exchange), "Web Services Enabling Technology for Application Integration and Assembly"
13
Basically, Web Services are a means of
By
http://www.convergemag.com/magazine/story .phtml?id=30079
14
15
[1] A Web service is a software system
[2] A collection of EndPoints. [WSD Reqs]
By W3C Web Services Glossary
Distributed system In which applications communicate with
via XML messages
By C. M. Sperberg-McQueen, W3C
Everything else follows from this. Most
messaging (e.g. SOAP, XML)
description (e.g. WSDL, XML Schema)
discovery (e.g. UDDI)
security (e.g. TLS, SSL)
16
17
Service vice Broke ker Servi vice ce Consume mer Service vice Provid ider Client Service vice Service vice broker ker is Opti tional
interact Serv rvic ice Contra tract …
18
XML based everywhere Message-based Programming language independent Could be dynamically located Could be dynamically assembled or
Accessed over the internet Loosely coupled Based on industry standards
19
User
Stock Quote Web Service
Input: Symbol Output: Price, News, Trade SetTrade Input: Symbol Output: Price News feed 1 Input: Symbol Output: News links … News feed n Input: Symbol Output: News links Brokerage 1 Input: Symbol, Price, Qty Output: Analysis Brokerage n Input: Symbol, Price, Qty Output: Analysis ..
20
E-commerce: order books, office supplies,
Track packages: UPS, FedEx Weather forecast Search location on Maps Telephone redirection, customizable rules
21
22 New user experience Software for smart device Connected Web services
Enabled through XML
? ? ? ?
23
Platform neutral Accessible in a standard way Accessible in an interoperable way Use simple and ubiquitous tools Relatively cheap Simplify enterprise integration
24
Interoperable – Connect across
Economical – Recycle components, no
Automatic – No human intervention
25
Accessible – Legacy assets & internal
Available – Services on any device,
Scalable – No limits on scope of
26
27
Web Services are something completely new
Web services is distributed computing all over
again – only now it is based on the web
Web services are XML-based
You have to write Web Services from scratch
Tools available for developing Web services,
such as MS .NET, Apache Axis, J2EE, and Systinet
28
Web services require only SOAP, WSDL,
We need more high-level semantics
Web services are based on the RPC
Document-driven model would be more
popular communication model
Web services must be based on HTTP
Other transports such as SMTP can also be
used
29
30
1. Service Registers (Publish)
service location (Discover)
(Bind) UDDI Registry Service Provider Service Client
31
Web Service Provider
Creates the Web service typically as
Deploys the service and makes them
Describes the Web service as a WSDL-
Registers the WSDL-based service
32
Registry
Stores the service description as binding
List various service types, descriptions,
33
Service Clients
Locates the required services by querying the
UDDI registry
Obtains the binding information and the URLs
to identify the service provider
Invokes the service provider Retrieves the WSDL Service description for
those registered services
Communicate with the service provider Exchange data or message by invoking the
available services in the service container
34
UDDI Registry 1
WSDL 2 3 Web Services
35
XML (Extensible Markup Language) SOAP (Simple Object Access Protocol) WSDL (Web Services Description
UDDI (Universal Description and
36
Text-based Markup Language Markup is the extra information for
Standard language for exchanging
Both XML and HTML are markup
<b>NSC</b> <event>NSC</event>
37
38
Simple and extensible License-free Platform independent International language support Read and edit XML using any standard
Several applications and usage
39
Easy data exchange Customizing Markup Languages
ebXML (Electronic Business Markup
Language)
Self-describing
Make automation of data processing possible
Validation
Apply semantic rules to specify the structure
40
System independent and vendor
Has metadata markup and is deliverable
There are style sheets for views and
XML enables integration of legacy
41
XML (Extensible Markup Language) SOAP (Simple Object Acces
WSDL (Web Services Description
UDDI (Universal Description and
42
SOAP stands for Simple Object Access
SOAP is a lightweight protocol intended
SOAP uses XML technologies
The framework has been designed to be
43
XML (Extensible Markup Language) SOAP (Simple Object Access Protocol) WSDL (Web Services
UDDI (Universal Description and
44
WSDL stands for Web Services Description
XML language for describi
XML service is described as
A set of communication endpoints (ports)
Endpoint is made of two parts
Abstract definition of operations and messages Concrete binding to networking protocol and
message format
45
XML (Extensible Markup Language) SOAP (Simple Object Access Protocol) WSDL (Web Services Description
UDDI (Universa
46
UDDI stands for Universal Description,
Programmatic registration and
Based on SOAP, HTML, and XML Registry data
Business registrations Service type definitions
Represe
The term was introduced in the
47
REST strictly refers to a collection of
The term is often used in a looser sense to
48
49
P O S T / S t
e . a s m x H T T P / 1 . 1 . . . < s
p : E n v e l
e . . . > < s
p : B
y > < G e t B
L i s t / > < / s
p : B
y > < / s
p : E n v e l
e >
W e b S e rv ic e Get list of books
H T T P / 1 . 1 2 O K . . . < s
p : E n v e l
e . . . > < s
p : B
y > < G e t B
L i s t R e s p
s e > < B
I D > 1 2 3 4 < / B
I D > < B
I D > 5 6 7 8 < / B
I D > < / G e t B
L i s t R e s p
s e > < / s
p : B
y > < / s
p : E n v e l
e > P O S T / S t
e . a s m x H T T P / 1 . 1 . . . < s
p : E n v e l
e . . . > < s
p : B
y > < G e t B
D e t a i l s > < B
I D > 1 2 3 4 < / B
I D > < / G e t B
D e t a i l s > < / s
p : B
y > < / s
p : E n v e l
e > H T T P / 1 . 1 2 O K . . . < s
p : E n v e l
e . . . > < s
p : B
y > < G e t B
D e t a i l s R e s p
s e > < B
> . . . < / B
> < / G e t B
D e t a i l s R e s p
s e > < / s
p : B
y > < / s
p : E n v e l
e >
Get book details
P O S T / S t
e . a s m x H T T P / 1 . 1 . . . < ? x m l v e r s i
= " 1 . " ? > < s
p : E n v e l
e x m l n s : s
p = " . . . " > < s
p : B
y > < O r d e r B
x m l n s = " . . . " > < B
I D > 1 2 3 4 < / B
I D > < P a y m e n t > . . . < / P a y m e n t > < S h i p p i n g > . . . < / S h i p p i n g > < / O r d e r B
> < / s
p : B
y > < / s
p : E n v e l
e >
W e b S e rv ic e Order Book
H T T P / 1 . 1 2 O K . . . < ? x m l v e r s i
= " 1 . " ? > < s
p : E n v e l
e x m l n s : s
p = " . . . " > < s
p : B
y > < O r d e r B
R e s p
s e x m l n s = " . . . " > < O r d e r I D > a b c d < / O r d e r I D > < / O r d e r B
R e s p
s e > < / s
p : B
y > < / s
p : E n v e l
e >
W e b S e rv ic e Get list of books Get book details
G E T / b
s / H T T P / 1 . 1 H T T P / 1 . 1 2 O K C
t e n t
y p e : t e x t / x m l . . . < ? x m l v e r s i
= " 1 . " ? > < b
s x m l n s = " . . . " > < b
h r e f = " h t t p : / / . . . / 1 2 3 4 / " / > < b
h r e f = " h t t p : / / . . . / 5 6 7 8 / " / > < / b
s > G E T / b
s / 1 2 3 4 / H T T P / 1 . 1 H T T P / 1 . 1 2 O K C
t e n t
y p e : t e x t / x m l . . . < ? x m l v e r s i
= " 1 . " ? > < b
x m l n s = " . . . " > < t i t l e > M
y D i c k < / t i t l e > . . .
h e r b
d a t a . . . <
d e r h r e f = " h t t p : / / . . . /
d e r s / " / > < / b
>
P O S T /
d e r s / H T T P / 1 . 1 . . . < ? x m l v e r s i
= " 1 . " ? > <
d e r x m l n s = " . . . " > < b
I d h r e f = " h t t p : / / . . . / b
s / 1 2 3 4 / " > < p a y m e n t > . . . < / p a y m e n t > < s h i p p i n g > . . . < / s h i p p i n g > < /
d e r >
W e b S e rv ic e Order Book
H T T P / 1 . 1 2 1 C r e a t e d L
a t i
: h t t p : / / . . . / a b c d /
53
54
55
Infrastructure Services
Amazon Simple Storage Service
Payments & Billing
Amazon Flexible Payments Service
On-Demand Workforce
Amazon Mechanical Turk
Web Search & Information
Alexa Web Information Service
Amazon Fulfillment & Associates
Amazon Associates Web Service
Application Hosting
Using Amazon Simple Storage Service (Amazon S3) Examples: AdaptiveBlue, LiveLeader, Smartsheet
E-Commerce
Using Amazon Flexible Payments Service Examples: GMP Services, Associate-O-Matic
High Performance Computing
Using Amazon Elastic Computing Examples: Washingtonpost.com
On-Demand Workforce
Using Amazon Mechanical Turk Examples: Casting Words, Hit-Builder
56
57
http://developer.yahoo.com
58
Yahoo! Answers Web Services APIs
Search for expert advice on any topic, from
within your very own site
Yahoo! Local Web Services
Local business information and user reviews
Yahoo! Delicious API
Read/write access to your Delicious
bookmarks and tags via an HTTP-based interface
59
http://code.google.com
60
APIs & Developer Tools
Android
Build mobile apps for Android, a software stack
mobile devices
Google Data APIs
A simple, standard protocol for reading and writing
data on the web
Blogger Data API
Enable your apps to view and update Blogger
content
Feedburner APIs
Interact with FeedBurner's feed management and
awareness-generating capabilities.
Google AdSense API
Generate revenue for you and your users by
placing ads on your website.
Google AdWords API
Automate and streamline your campaign
management activities
Google Calendar APIs and Tools
Create and manage events, calendars, and
gadgets for Google Calendar.
Google Checkout API
Start selling on your website.
61
62
http://www.rd.go.th/webservice/
63
Create service oriented organization
Serve as a catalyst in driving e-
Sample services: PIN/TIN Verification
64
http://www.pttplc.com/pttinfo.asmx
65
The users can get the information
Support these five operations
GetOilPrice CurrentOilPrice GetNews CurrentNews
NECTEC Speech Technology Web Services (1/2)
66
http://vaja.nectec.or.th/ws/vaja-webservice.html
NECTEC Speech Technology Web Services (2/2)
VAJA Web Service
Convert text to speech using Vaja program
iSpeech Web Service
Convert speech to text using iSpeech
program
67
68
XMethods
http://www.xmethods.com
Mindreef
http://www.mindreef.net/tide/index.mrj
http://www.soapclient.com/
WebServiceX.net
http://www.webservicex.net/WS/wscatlist
Pete Cashmore's Mashable
http://mashable.com/
Emily Chang's eHub
http://www.emilychang.com/go/ehub
ProgrammabWeb – Mashups, APIs,
http://www.programmableweb.com
Web Services Search Engine
http://seekda.com
69
70
Web Services Forum at KKU http://campus.en.kku.ac.th/forums XML and Web Services Course at KKU http://gear.kku.ac.th/~krunapon/xmlws
Thai Java Developers
http://www.thaijavadev.com/ Web Services Contest in National Software Const
http://www.hpcc.nectec.or.th/wiki/index.php/Web
_Services_Contest
Narisa.com http://www.narisa.com
71
72
Open Source Web Services Tools in Java (1/4)
Axis: the third generation of Apache
http://ws.apache.org/axis2/ A simple stand-alone server A server which plugs into servlet engines
Extensive support for the WSDL Emitter tooling that generates Java classes
A tool for monitoring TCP/IP packets
Open Source Web Services Tools in Java (3/4)
Apache CXF: An Open Source Service
Apache CXF is an open source services
framework
CXF helps you build and develop services using
frontend programming APIs, like JAX-WS
These services can speak a variety of protocols
such as SOAP, XML/HTTP, RESTful HTTP, or CORBA and work over a variety of transports such as HTTP, JMS or JBI
http://cxf.apache.org/
73
Open Source Web Services Tools in Java (4/4)
XINS is an open-source Web Services
From the specifications written in simple
http://xins.sourceforge.net/
74
75
IBM WebSphere Software
http://www-
http://msdn.microsoft.com/webservices/
webMethods
http://www.webmethods.com
Extends the Eclipse platform with
It includes source and graphical
http://www.eclipse.org/webtools/
76
A free, open-source Integrated
You get all the tools you need to create
Support JAX-WS Web Services and
http://www.netbeans.org/
77
78
Web services technology exists for making
XML is the language of exchange data Web service standards are open standards Web services have been developed and used
Thailand should develop and employ Web
79
CMSThailand Web Services,
http://ws.cmsthailand.com/
Hugo Haas, W3C, “Designing the architecture
for Web Services”, http://www.w3.org/2003/Talks/0521-hh-wsa/
Sang Shin, “Web Services and SOA
Programming”, http://www.javapassion.com/webservices/
Wikipedia, “Representational State Transfer”,
http://en.wikipedia.org/wiki/Representational_Sta te_Transfer
Java-Source.net, “Open Source Web Services
Tools in Java”, http://java-source.net/open- source/web-services-tools
C. M. Sperberg-McQueen, “Web Services
Peter Drayton, “REST & SOAP”,
80