2. Web service
• A Web service is an interface that describes a
collection of operations that are network accessible
through standardized XML messaging
• Communicates via open protocols (HTTP, etc.)
Dr. K. Balasubramanian, Associate
Professor/CSE
2
3. Web Service roles
• Service provider
• Service requester
• Intermediaries
• Initial sender and ultimate receiver
• Service compositions /service controller
Dr. K. Balasubramanian, Associate
Professor/CSE
3
4. Web service
Service Provider
• This is the provider of the web service. The service
provider implements the service and makes it
available on the Internet.
Dr. K. Balasubramanian, Associate
Professor/CSE
4
5. Web service
Service Registry
• This is a logically centralized directory of services. The
registry provides a central place where developers can publish
new services or find existing ones.
• Service provider use service registry to publish their services
• Service requestor use service registry to locate the desired
service
Dr. K. Balasubramanian, Associate
Professor/CSE
5
6. Web service
Service Requestor
• This is any consumer of the web service. The requestor
utilizes an existing webservice
• Service requestor does the following task:
– Sends the desired service search query to the service
registry
– The service registry is then return all matching service
descriptions to the service requester
– The service requester is then pick the best suitable service
by comparing features of all given services
– The service requester is then send the service request
message to the service provider using SOAP protocol
Dr. K. Balasubramanian, Associate
Professor/CSE
6
14. WSDL
• Web Service Description Language, is an XML based
definition language. It's used for describing the
functionality of a SOAP based web service.
• WSDL is often used in combination with SOAP and an
XML Schema to provide Web services over the
Internet. A client program connecting to a Web service
can read the WSDL file to determine what operations
are available on the server.
• WSDL definitions describe how to access a web service
and what operations it will perform.
Dr. K. Balasubramanian, Associate
Professor/CSE
14
15. • The following figure describes how WSDL
definitions enable loose coupling between
services.
Dr. K. Balasubramanian, Associate
Professor/CSE
15
16. WSDL Types
1. Abstract WSDL
consists of the structure of the message that is; what
operation, what is the input and what is the ouput .
It consists of 3 parts
1. portType
Describes the operations that can be performed and the
messages involved
2. Operation
It represents a specific action performed by the service.
3. Message
Defines the data elements for each operation
Dr. K. Balasubramanian, Associate
Professor/CSE
16
17. 2. Concrete WSDL
It has all the things that the abstract wsdl has in addition it
has transport(http) details.
It consists of 3 parts
1. Binding
Defines the protocol and data format for each port type
2. Port
The port represents the physical address at which a service
can be accessed
3. Service
The service contains the web service name and a list of ports.
Dr. K. Balasubramanian, Associate
Professor/CSE
17
18. Metadata and service contracts
Meta data
Meta data provides the information about
service. There are three separate documents
that each describe an aspect of a service:
1. WSDL definition
2. XSD schema
3. policy
Dr. K. Balasubramanian, Associate
Professor/CSE
18
19. WSDL definition
Provides machine readable description of web servcies
XSD Schema
WSDL definitions frequently rely on XSD schemas to
validate the structure of incoming and outgoing
messages.
Policy
Policies can provide rules, preferences, and processing
details through the WSDL and XSD schema documents
Dr. K. Balasubramanian, Associate
Professor/CSE
19
20. service contracts
• Service contract, which is a set of conditions
that must be accepted by a potential service
requestor to enable successful communication
with service provider
• The below figure describes a service contract
comprised of a collection of service
descriptions and possibly additional
documents.
Dr. K. Balasubramanian, Associate
Professor/CSE
20
22. Semantic descriptions
• The most challenging part of providing a
complete description of a Web service is in
communicating its semantic qualities.
• Examples of service semantics include:
– how a service behaves under certain conditions
– how a service will respond to a specific condition
– what specific tasks the service is most suited for
Dr. K. Balasubramanian, Associate
Professor/CSE
22
23. Service description advertisement
and discovery
• As the amount of services increases within
and outside of organizations, mechanisms for
advertising and discovering service
descriptions may become necessary
Dr. K. Balasubramanian, Associate
Professor/CSE
23
24. Messaging with SOAP
• It is Simple Object Access Protocol
• SOAP messages are in the form of XML documents
• SOAP is a protocol that allows for the exchange of data
whose structure is defined by an XML scheme
• SOAP was developed as an intermediate language for
applications that have different programming
languages, enabling these applications to communicate
with each other over the internet.
• The SOAP specification's main purpose is to define a
standard message format. The structure of SOAP
format is quite simple.
Dr. K. Balasubramanian, Associate
Professor/CSE
24
25. Basic building blocks
• SOAP message consist of the following
components:
– SOAP envelope
– SOAP Header
– SOAP Body
– SOAP Fault
– SOAP Attachment
•
Dr. K. Balasubramanian, Associate
Professor/CSE
25
26. Basic structure of a SOAP message
Dr. K. Balasubramanian, Associate
Professor/CSE
26
27. Envelope
• Every SOAP message is packaged into a
container known as an envelope.
• The envelope is responsible for encapsulating
all the data in a message and identifies the
XML document as a SOAP message.
Dr. K. Balasubramanian, Associate
Professor/CSE
27
28. Header
• The Header element contains additional
information about the SOAP message.
• Each message can contain a header, an area
dedicated to hosting meta information
• This header section is a vital part of the overall
architecture, but optional, it is rarely omitted.
Body
• The Body element includes the details of the
actual message that need to be sent
• consists of XML formatted data
Dr. K. Balasubramanian, Associate
Professor/CSE
28
29. Fault
• The fault message is an optional fourth
building block.
• The use of this section is to provide
information about errors that occur while
processing the message.
Attachments
• To facilitate the delivery of non-textual data
that is not easily formatted into an XML
document, the use of SOAP attachment
technologies exist (Eg: Images)
Dr. K. Balasubramanian, Associate
Professor/CSE
29
30. SOAP Nodes
• SOAP nodes are used to transmit and receive
and process SOAP messages
Dr. K. Balasubramanian, Associate
Professor/CSE
30
31. Node types
1. SOAP sender: A SOAP node that transmits a message
2. SOAP receiver: A SOAP node that receives a message
3. SOAP intermediary: SOAP node that receives and
transmits a message, and optionally processes the
message prior to transmission
4. initial SOAP sender: the first SOAP node to transmit a
message
5. ultimate SOAP receiver: The last SOAP node to receive
a message
Dr. K. Balasubramanian, Associate
Professor/CSE
31
32. SOAP intermediaries
SOAP node that receives and transmits a message, and
optionally processes the message prior to transmission
Dr. K. Balasubramanian, Associate
Professor/CSE
32
33. Type of intermediaries
SOAP nodes acting as intermediaries can be
classified as
Forwarding intermediaries: it is responsible for
relaying the contents of a message to a subsequent
SOAP node, without modifying the content of
SOAP message
Active intermediaries: it is responsible for relaying
the contents of a message to a subsequent SOAP
node by modifying the content of SOAP message
Dr. K. Balasubramanian, Associate
Professor/CSE
33
34. Message paths
• A message path refers to the route taken by a
message from when it is first sent until it
arrives at its ultimate destination.
• Therefore, a message path consists of at least
one initial sender, one ultimate receiver, and
zero or more intermediaries as shown in the
figure:
Dr. K. Balasubramanian, Associate
Professor/CSE
34
36. • Note also that a message path is sometimes not
predetermined. The use of header blocks processed
by intermediaries can dynamically determine the
path of a message.
Dr. K. Balasubramanian, Associate
Professor/CSE
36
37. UDDI (Universal Description,
Discovery, and Integration)
• UDDI provides us with a registry model
• UDDI is a specification for a distributed
registry of web services.
• UDDI is a platform-independent, open
framework
• UDDI can communicate via SOAP, CORBA, Java
RMI Protocol.
• UDDI uses Web Service Definition Language
(WSDL) to describe interfaces to web services.
Dr. K. Balasubramanian, Associate
Professor/CSE
37
38. • UDDI has two sections:
• A registry of all web service's metadata, including
a pointer to the WSDL description of a service.
• A set of WSDL port type definitions for
manipulating and searching that registry
Private and public registries
• UDDI specifies a standard for structuring
registries that keep track of service descriptions
as shown in the Figure. These registries can be
searched manually and accessed
programmatically via a standardized API
Dr. K. Balasubramanian, Associate
Professor/CSE
38
40. There are two types of registries. They are
• Public registry
• Private registry
Public registry
• Public registries accept registrations from any
organizations. Once signed up, organizations acting as
service provider entities can register their services.
Private registry
• Private registries can be implemented within
organization boundaries to provide a central repository
for descriptions of all services the organization
develops, leases, or purchases
Dr. K. Balasubramanian, Associate
Professor/CSE
40
41. Components of UDDI
Following are descriptions of the primary parts that comprise
UDDI registry records.
Business entities and business services
Business entities
Each public registry record consists of a business entity
containing basic profile information about the organization
business services
• This record consists of one or more business service areas,
each of which provides a description of the services offered
by the business entity
• Within the UDDI registry, this structure contains information
about the company itself, including contact information,
industry categories, business identifiers, and a list of services
provided
Dr. K. Balasubramanian, Associate
Professor/CSE
41
42. Binding templates and tModels
bindingTemplate
• Binding templates are the technical
descriptions of the web services represented
by the business service structure
• The binding template represents the actual
implementation of the web service
• A single business service may have multiple
binding templates
Dr. K. Balasubramanian, Associate
Professor/CSE
42
43. tModel
• tModel stands for technical model.
• tModel section of UDDI records provides pointer to actual service
description
• The basic structure of a UDDI business entity record shown in the
following figure
Dr. K. Balasubramanian, Associate
Professor/CSE
43
44. • A business or a company can register three
types of information into a UDDI registry. This
information is contained in three elements of
UDDI. These three elements are:
– White Pages,
– Yellow Pages, and
– Green Pages.
Dr. K. Balasubramanian, Associate
Professor/CSE
44
45. White Pages
• White pages contain:
• Basic information about the company and its
business.
• Basic contact information including business
name, address, contact phone number, etc.
• A Unique identifiers for the company tax IDs.
This information allows others to discover
your web service based upon your business
identification
Dr. K. Balasubramanian, Associate
Professor/CSE
45
46. Yellow Pages
• Yellow pages contain more details about the company. They include
descriptions of the kind of electronic capabilities the company can
offer to anyone who wants to do business with it.
• Yellow pages uses commonly accepted industrial categorization
schemes, industry codes, product codes, business identification
codes and the like to make it easier for companies to search
through the listings and find exactly what they want.
Green Pages
• Green pages contains technical information about a web service. A
green page allows someone to bind to a Web service after it's been
found. It includes:
• The various interfaces
• The URL locations
• Discovery information and similar data required to find and run the
Web service.
Dr. K. Balasubramanian, Associate
Professor/CSE
46