Web Services Architecture-2
Web Services Architecture-2
Architecture
Siddharth Ruchandani
CS 6362 – SW Architecture & Design
Summer 2005
07/11/05
Current Business Situation
Systems “built to task,
built to last” work well
independently
Accomplish what they
were designed for
But what if these
systems want to
connect together?
The Problem
Most systems aren’t
designed to work with
each other
Connecting the
Accounting with Sales
system is expensive,
time-consuming, and
unreliable
The Solution
A standard way for
systems to
communicate with
each other
The Solution
A standard way for
systems to
communicate with
each other
XML Web Services
No need to re-
design existing
components
The Solution
A standard way for
systems to
communicate with
each other
XML Web Services
No need to re-design
existing components
Not only connect
systems, connect
people
Web Services
Provide a way for
systems to
interoperate across
different platforms &
operating systems
Structured way to
format data, describe
service capability and
availability
Web Service Principles
Message Orientation – Web services communicate using messages
Protocol Composability – Web services avoid monolithic design by
the use of modular building blocks that can be re-used
Autonomous Services – Can be designed, implemented, managed,
versioned, and deployed independently
Managed transparency – can manage which functionalities we want
to make available to the end-service and which to hide
Protocol-based integration – can be implemented using simple
protocols
Web Services Architecture
HTTP – Hyper Text
Discovery (UDDI) Transfer Protocol
XML – Extensible Markup
Description (WSDL)
Language
Standard structure (SOAP) SOAP – Simple Object
Encoding (XML)
Access Protocol
WSDL – Web Service
Transport (HTTP) Description Language
UDDI – Universal
Web Service layers Description, Discovery &
Integration
XML – eXtensible Markup Language
Unit of Information
transfer
Simple, text-based
Message – an XML
document information
item as defined by the
XML Infoset
Infoset – Abstract data
model, foundation of XML
Specifications (XML
Schema, XML Query,
XSLT)
XML – eXtensible Markup Language
<m:GetContactInfo
xmlns:m="http://example.org/CompanyInfo">
<ContactName>Sidd R.</ContactName>
<CompanyName>SARK</CompanyName>
<StreetName>W. Las Colinas</StreetName>
</m:GetContactInfo>
XSD
XML Schema Definition
Schema - an abstract representation of an object's
characteristics and relationship to other objects
XML schema represents the interrelationship between the
attributes and elements of an XML object (for example, a
document or a portion of a document)
Provides a universal type system, allowing data types to be
defined and passed across platforms.
For an XML Web service, XSD defines the structure and data
types for the XML encapsulated within a SOAP message sent
to and from an XML Web service.
For example, within a schema for a document describing a
Web site, you would define a Web site element, a Web page
element, and other elements that describe possible content
divisions within any page on that site.
SOAP
SOAP(Simple Object Access
Protocol) is a lightweight protocol
intended for exchanging structured
information in a decentralized,
distributed environment.
SOAP uses XML technologies to
define an extensible messaging
framework, which provides a
message construct that can be
exchanged over a variety of
underlying protocols.
The framework has been designed
to be independent of any particular
programming model and other
implementation specific semantics.
SOAP 1.2 Specification definition
XML document containing 3
elements: <Envelope>, <Header>,
<Body>
SOAP
SOAP Over HTTP
SOAP Processing Model
Identify the header block intended for the current SOAP node
If header block cannot be processed, message is discarded and
fault message generated
Process message
If current node not the ultimate receiver, then message is relayed to
the next SOAP node
WSDL
Web Service Definition
Language
Describes
What a request message
must contain
What the response
message might look like
Where the service is
available
What protocol required to
talk to the service
WSDL
WSDL documents can
maintain information like
method signatures, data
returned, etc. about a
web service
Applications can maintain
a pointer to the required
web service’s WSDL docs
Applications can then call
the various methods of
the web service
WSDL (Example)
WSDL (Example)
http://www.xmethods.com/ve2/ViewListing.po;(QHyMHiRM)?key=uuid:D784C184-99B2-DA25-ED45-3665D11A12E5
UDDI
Universal Description
Discovery &
Integration
Analogous to a
phonebook
Specifies protocol for
querying a directory
of web services
UDDI
A UDDI director entry has
3 primary parts
Service provider – to
contact someone
responsible for the service
Web services offered –
organized by application
area, geography, etc.
Bindings to implementation
– associates web service
entry to the exact URI,
protocol to use for access
XML Web Service Lifetime