Professional Documents
Culture Documents
World Wide
Components
Web
Web Services
Middleware Standards
Web-based Services
Services offered through a Web site
Web Services
Services offered through Web-wide standardized
protocols
SOAP
Client XML Server
HTTP
©IKS, ETH Zürich. 6
Extending the Web with Services
HTML/HTTP SOAP/HTTP
Web Server
add your
Java ASP
CGI PHP favourite
Servlet .NET here
Enterprise
DCOM Eiffel
Java
Objects .NET
Beans
Assemblies
Web Legacy
CORBA
Services COBOL
Objects
Programs
Java Eiffel
DCOM
Bean .NET
Object
Assembly
Web Legacy
CORBA COBOL
Object Service
Program
Layers
Standard
Standard API
Standard User SOAP
Network Interface
HTML XML
Protocol
HTTP
TCP/IP
Ethernet POTS Wireless
Limitations of Middleware
Company A | A direct connection between different
organizations is not allowed (security
breach) and sometimes not possible
(incompatible middleware)
middleware
Company B
Company C
Middleware
middleware
Global
Middleware
Company B
Company C
Middleware
Limitations of Middleware
Company A | Point to Point solutions are expensive and
do not scale well with the number of
systems to be integrated
middleware
Company B
Company C
Middleware
middleware WS We
bS
e rv
ices
pro Company B
toc
ols
Web Services
Wrapper
Company C
Middleware
Web Services
The term Web services has This definition emphasizes different
become nowadays very popular aspects:
and it is not always used with the In order to be accessible, a service
should be defined, described and
same meaning. discovered.
At one extreme, a Web service is XML is the foundation for all
any application which is standards that are going to be used
accessible through the WWW (SOAP, WSDL, UDDI)
Web services are components that
More precisely, a Web service is a can be readily integrated into more
software application identified by complex distributed applications.
a URI, whose interfaces and Web services are meant for
bindings are capable of being software based consumption
defined, described and discovered (while Web-based applications are
meant to be used by humans
as XML artifacts. A Web service equipped with a WWW browser)
supports direct interactions with
other software
agents using
XML-based messages
exchanged via
the Internet (W3C)
architecture of existing
synchronous middleware
platforms
current specifications of
SOAP, UDDI and WSDL
The architecture has a
remarkable client/server flavor
It reflects only what can be SOAP
done with
SOAP (Simple Object
Access Protocol)
UDDI (Universal
Description and Discovery
Protocol)
WSDL (Web Services WSDL
Description Language)
©IKS, ETH Zürich. 24
The Service Bus
The service bus can be seen a refactoring of the basic Web
service architecture, where a higher degree of loose coupling
has been added. This looks very similar to a message broker.
Service Bus
SOAP
Remote calls in RPC/DCE
ORB ORB
MIDDLEWARE Marshalling MIDDLEWARE
and serializing
arguments
TCP/IP TCP/IP
socket socket
SCM SCM
MIDDLEWARE Marshalling MIDDLEWARE
and serializing
arguments
DCE DCE
RPC RPC
This could be
INTERNET
RPC, CORBA,
DCOM, using SOAP
as protocol
SOAP Messages
SOAP is based on message
exchanges SOAP Envelope
Messages are structured with an SOAP header
envelope where the application
encloses the data to be sent
A message has two main parts: Header Block
header: which can be divided
into blocks SOAP Body
body: which can also be
divided into blocks
SOAP does not say what to do Body Block
with the header and the body, it
only states that the header is
optional and the body is
mandatory
Use of header and body, however,
is implicit. The body is for
application level data. The header
is for infrastructure level data
©IKS, ETH Zürich. 38
For the XML fans (SOAP, body only)
XML name space identifier for SOAP serialization
XML name space identifier for SOAP envelope
<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-URI">
<symbol>DIS</symbol>
</m:GetLastTradePrice>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
From the: Simple Object Access Protocol (SOAP) 1.1. ©W3C Note 08 May 2000
<SOAP-ENV:Envelope
xmlns:SOAP-ENV=
"http://schemas.xmlsoap.org/soap/envelope/"
SOAP-ENV:encodingStyle=
"http://schemas.xmlsoap.org/soap/encoding/"/>
<SOAP-ENV:Header>
<t:Transaction
xmlns:t="some-URI"
SOAP-ENV:mustUnderstand="1">
5
</t:Transaction>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<m:GetLastTradePrice xmlns:m="Some-URI">
<symbol>DEF</symbol>
</m:GetLastTradePrice>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
SOAP header
RPC Response (one of the two)
Security context
Message SOAP Envelope SOAP Envelope
Signature
SOAP header SOAP header
Security context Security context
SOAP Body Message Message
Signature Signature
Name of Procedure
In XML (a request)
POST /StockQuote HTTP/1.1
Host: www.stockquoteserver.com
From the: Simple Object Access Protocol (SOAP) 1.1. © W3C Note 08 May 2000
<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-URI">
<symbol>DIS</symbol>
</m:GetLastTradePrice>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset="utf-8"
Content-Length: nnnn
<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-URI">
<Price>34.5</Price>
</m:GetLastTradePriceResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
HTTP POST
SOAP Body
Name of Procedure
Input parameter 1
SERVICE REQUESTER SERVICE PROVIDER
Input parameter 2
Procedure
RPC call
HTTP engine
HTTP engine
SOAP SOAP
engine engine
HTTP Acknowledgement
SOAP
SOAP Envelope
Envelope
SOAP header
Transactional
context
SOAP Body
Return parameter