Beruflich Dokumente
Kultur Dokumente
Part I
Introduction
Source: http://www.globus.org
Steps:
Service-Oriented Architecture
Service registry
1. Publish
2. Find
3. Bind
Service requester Service provider
• Service Provider:
– Implements service Service
Registry
– Makes it available Register
on Internet Discover
Service
Service
• Service Requestor:
– Consumer of WS Service Service
Requestor Provider
• Service Registry: Invoke
Service
– WS directory
SOA
Reusability
o promoting reuse
Composability Loosely
Coupled
o coordinated and assembled to
form composite services
Statelessness
o minimize retaining information
specific to an activity
Discoverability
o externally descriptive
• HTTP transport
Service Discovery
UDDI
Service Description
WSDL
Service Invocation
SOAP + XML
Transport
HTTP
GC: Web Services-I Rajeev Wankar
23
Web Services
X!
3 2
4
5
6
Source: http://www.globus.org
• DCOM/CORBA:
– client creates a persistent connection to the object to
perform multiple property accesses and method
calls.
• Both support stateful remote connections –
– SOAP typically does not
• could be implemented with server side state
management of an application (we will see in the
next classes how WSRF maintains the state)
DB Scientific other
SOAP Header(optional)
• Elements in SOAP Header <?xml version="1.0"?>
define how a recipient should <soap:Envelope
process the SOAP message xmlns:soap="http://www.w3.org
• Header elements must have /2001/12/soap-envelope"
attributes: soap:encodingStyle="http://ww
w.w3.org/2001/12/soap-
– 3 attributes in encoding">
namespace <soap:Header>
("http://www.w3.org/2001 <m:Trans
/12/soap-envelope") xmlns:m="http://www.w3schools
.com/transaction/"
• actor: used to address Header
soap:actor="http://www.w3scho
element to endpoint
ols.com/appml/">
• mustUnderstand true: receiver 234
processing Header must </m:Trans>
recognize element </soap:Header>
• encodingStyle
GC: Web Services-I Rajeev Wankar
36
SOAP Body
REQUEST: RESPONSE:
<?xml version="1.0"?> <?xml version="1.0"?>
<soap:Envelope <soap:Envelope
xmlns:soap="http://www.w3.org/2001/12 xmlns:soap="http://www.w3.org/2001/12/
/soap-envelope" soap-envelope"
soap:encodingStyle="http://www.w3.org soap:encodingStyle="http://www.w3.org/
/2001/12/soap-encoding"> 2001/12/soap-encoding">
<soap:Body> <soap:Body>
<m:GetPrice <m:GetPrice
xmlns:m="http://www.fruitmrkt.com/ xmlns:m="http://www.fruitmrkt.com/
prices"> prices">
<m:Item>Apples</m:Item> <m:Item>40</m:Item>
</m:GetPrice> </m:GetPrice>
</soap:Body> </soap:Body>
</soap:Envelope> </soap:Envelope>
<soap:Envelope <soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/s xmlns:soap="http://www.w3.org/2001/12/s
oap-envelope" oap-envelope"
soap:encodingStyle="http://www.w3.org/2 soap:encodingStyle="http://www.w3.org/2
001/12/soap-encoding"> 001/12/soap-encoding">
<soap:Body <soap:Body
xmlns:m="http://www.stock.org/stock xmlns:m="http://www.stock.org/stock
"> ">
<m:GetStockPrice> <m:GetStockPriceResponse>
<m:StockName>IBM</m:StockName> <m:Price>34.5</m:Price>
</m:GetStockPrice> </m:GetStockPriceResponse>
</soap:Body> </soap:Body>
</soap:Envelope> </soap:Envelope>
Network Layer
Client
Application Corporate
Program Web Server
Server Network
Ex. Browser
Comparison
Web Services
Part II