Professional Documents
Culture Documents
to
Web Services
Raju. A
Web services
A web service is a collection of protocols and
standards used for exchanging data between
applications or systems.
Disadvantages
• Vendor Specific
• Platform Specific
• No interoperability
• Configuring Firewalls
CORBA-based approach
Waiting
Waitingfor
for Sending
Sending
requests
requests Data in binary format requests,
requests,
(known location,
(known location,
known
getting
getting
knownport)
port)
results
results
• CORBA:
– Data transmitted as objects (at least it looks like that)
– Transport (usually) over well standardised IIOP protocol
– user sessions (state-fullness) very inter-operable
– server side: an RPC call is made
Distributed architecture
• gives
– access to distributed resources
– development encapsulation
• maintainability, re-usability, legacy-awareness
– implementation independence
• requires
– adding a communication layer between parts
– synchronization of efforts.
Distributed architecture
Waiting
Waitingfor
for Sending
Sending
requests
requests Communication protocol, Data format requests,
requests,
(known location,
(known location,
known
getting
getting
knownport)
port)
results
results
Traditional CGI-based approach
Waiting
Waitingfor
for Sending
Sending
requests
requests Data as name/value pairs requests,
requests,
(known location,
(known location,
known
getting
getting
knownport)
port)
results
results
• cgi-bin scripts:
– Data transmitted as name-value pairs (HTML forms)
– Transport over (state-less) HTTP protocol
– no standards for keeping user sessions (state-fullness)
– server side: a script is called
SOAP-based communication
Waiting
Waitingfor
for Sending
Sending
requests
requests Data in XML format requests,
requests,
(known location,
(known location,
known
getting
getting
knownport)
port)
results
results
• SOAP:
– Data in a well-defined XML format
– Transport over various protocols
• HTTP, SMTP are the most used, perhaps because they are
firewall-friendly
– server side: either an RPC call or a message delivered
Service Oriented Architecture
• Service
– Small program interacted by well defines message
exchanges
– Agile, Reliable, Stable, Interoperable, Secure
• Four Tenets
– Boundaries are Explicit
– Services are Autonomous
– Services share schema and contract, not class
– Service compatibility is based upon policy
Service Oriented Architecture
L
Service
SD
Registry
W
ve
ie
tr
Pu
Re
bl
is h
&
er
ov
sc
Di
Service Service
Requestor Provider
Bind
According to the SOA
A Web service is:
An interface that describes a collection of network
accessible operations
Described using a service description language
Published by making this service description available to
users
Found by sending queries to a registry matching service
descriptions
Bound-Invoked by using the information contained in the
service description
Composed with other services to create new services
(service orchestration)
eXtensible Markup Language
• Why?
– XML is pure text with no binary data
– Applications read the XML
– Applications share data using XML . Any application can talk to
any other
application using XML (unlike binary) irrespective of the platform
– XML is a method for putting structured data in a text file
XML Rules
• Well formed
– Syntax is correct (all tags opened and closed)
• Valid
– All the elements matches the definitions written in the schema
• XML Documents (.xml) == XML Instances of the Schema (.xsd)
• DTD
– Document Type Definitions – Validates XML data against it
• XML Schema
– Alternative to DTD with added functionality. It supports other data types not
supported by DTD
• Predefined Simple Types (integers,booleans,dateTime…)
• User-defined datatypes ( Complex Types)
• Validations Restrictions to types
– XML schema itself is an XML document !
• XML Processing
– Read the XML documents XML processors (Parsers)
• SAX (based on events)
• DOM ( reads the xml document and loads it in memory)
• Python implements this interfaces in a package PyXML
SOAP
• Simple Object Access
Protocol
• SOAP is an open protocol
specification defining a
uniform way of performing
RPCs using HTTP as the
underlying communications
protocol with XML for the
data serialization.
PORT 80 or HTTP
XML Messaging Using SOAP
SOAP
An internet standard specification, the goal of which is to define
a platform and vendor neutral wire protocol based on internet
standard protocols (HTTP & XML) to access web services.
HTTP Header
HTTP Body
• portType
– Abstract definition of a Port Port
(e.g. http://host/svc)
Livermore July 25
2001
Client invocation
1. SW companies, standards
bodies, and programmers
Marketplaces, search
populate the registry with
engines, and business
descriptions of different
apps query the
types of services
registry to discover
services at other
companies
2.