Web Services
Web Services
A Web Service can dynamically interact with other Web applications using
open standards that include XML, UDDI and SOAP
2
What is a Web service? (Contd.).
Web Services do not provide the user with a GUI
3
Web Services Examples
• A stock quote service
• A route finder for delivery of goods
• A weather service
• A map service
• A Web search service
4
Why Web Service ?
Web businesses need a way to publish links to their applications and data
5
Features of Web Service
Web Services use standardized protocols SOAP, UDDI, WSDL and HTTP
for implementation
6
How Web Services work
Next, this XML data is transformed into a format that will be understood
by a particular back-end software system.
7
Requirements of applications running on Web
Applications that interact with one another over the Web must:
- be able to find one another
- discover information allowing them to interconnect
- figure out what the expected interaction patterns are
-negotiate such qualities of service as security,
reliability and transactional composition
8
WebService Architecture
WebService Architecture (Contd.).
Web services require several related XML-based technologies to
transport and transform data into and out of programs and databases
XML:
The basic foundation on which Web services are built
Provides a language for defining data and processing it
Represents a family of related specifications published and
maintained by the World Wide Web Consortium (W3C) and others
10
WebService Architecture (Contd.).
SOAP:
A collection of XML-based technologies
Defines an envelope for Web services communications –
maps to HTTP and other transports
Provides a serialization format for transporting
XML documents over the network
Provides a convention for representing RPC interactions
11
Introduction
SOAP stands for Simple Object Access Protocol
SOAP is a lightweight XML based messaging Protocol
Used to encode the information in Web Service Request and
Response messages before sending them over a network
It also specifies what parts of the messages should be read by
whom and how to react in case the content is not understood
SOAP messages are independent of any operating system or
protocol and may be transported using a variety of Internet
protocols
1
What SOAP covers
SOAP covers the following four main areas :
A message format for one-way communication describing how a
message can be packed into an XML document
A description of how a SOAP message should be transported
through the Web (using HTTP) or e-mail (using SMTP)
A set of rules that must be followed when processing a SOAP
message and a simple classification of the entities involved in
that processing
A set of conventions on how to turn an RPC call into a SOAP
message and back and how to implement the RPC style of
interaction
1
SOAP architecture
1
SOAP Architecture (Contd.).
1
SOAP Architecture (Contd.).
1
SOAP Architecture (Contd.).
•For this, it will consult the deployed services list, which is actually a
list of all services that the SOAP server hosts. If yes, the service
manager will pass on the SOAP request to the XML translator.
18
SOAP Architecture (Contd.).
It is also responsible for converting the response from the actual service back
to the XML Structure of the SOAP response
The box labeled actual service in the figure,is the location where actual
service resides.
19
SOAP Architecture (Contd.).
When the XML translator invokes some method of actual service
implementation, the method will perform its job and return the
resulting information back to the XML translator.
Both ends of this arrow are within the same enterprise, which
means that the same organization has the control over interfaces at
both ends of communication.
20
Structure of Basic SOAP Message
SOAP provides the envelope for sending
Web Services messages over the
Intranet/Internet. It is part of the set of
standards specified by the W3C
21
The Basic Structure of SOAP (Contd.).
A SOAP message:
Must have a root element, and in SOAP, it’s the Envelope element
Envelope may contain an optional Header element and must contain a
Body element
Header element must be the immediate child of the Envelope element
and precedes the Body element
Body element contains the actual application data being
exchanged between applications in XML format
22
Structure of a real XML SOAP Messag
What is UDDI?
UDDI stands for Universal Description, Discovery,
and Integration and is the name for a specification
that defines a way to store and retrieve information
about a business and its technical interfaces
25
What is UDDI? (Contd.).
UDDI is a unified and systematic way to find
service providers
26
What is UDDI? (Contd.).
UDDI specifies schemas to encode information
about businesses that deploy WebServices and
Schemas to encode information about WSs
themselves
27
What is UDDI? (Contd.).
Microsoft, IBM, and Ariba originally developed the UDDI
specification and was first published in September 2000
30
What is WSDL? (Contd.).
Web service is described as a
communication endpoints that set of
exchanging messages. These arecommunication
capable
endpoints are called ports. of
31
Why WSDL?
• Arbitration
32
Where is WSDL used?
SOAP Request
1) Register
WebService
2) Search For Webservice
UDDI
SOAP Request registry SOAP Request
33
Characteristics of Web Service
WSDL enables a service provider to specify the
following characteristics of a Web service:
1. Name of the Web service and addressing
information
2. Protocol and encoding style to be used when
accessing the public operations of the Web service
3. Type information:
Operations, parameters, and data types
comprising the interface of the Web service and a name
for this interface
34
WSDL Document Structure
The 6 basic building blocks
A WSDL Document is a set of definitions with a single root element. Services can
be defined using the following XML elements: