0% found this document useful (0 votes)
46 views35 pages

Web Services

Uploaded by

farhanamfk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views35 pages

Web Services

Uploaded by

farhanamfk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 35

What is a Web service?

Web Services are web application components which can be


published, found and used on the web

The goal of Web Services is interoperability

The capability of two different software applications to communicate with


each other is generally referred to as interoperability.

Web Service is a platform to build loosely coupled applications

Web service technology is used to allow applications on different


platforms to exchange business data

A Web service can be invoked using HTTP

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

Web Services instead share business logic, data and process


through a programmatic interface across a network

Web services technologies are used for Application-to-Application


(A2A) integration or Business-to-Business Communication(B2B)

A2A refers to dissimilar applications within the same organization


communicating and exchanging data between them

B2B refers to Multiple organizations, typically Business partners


exchanging data

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 does not support software interactions very well

Web businesses need a way to publish links to their applications and data

Internet based applications need to be able to find, access and


automatically interact with other applications

5
Features of Web Service
Web Services use standardized protocols SOAP, UDDI, WSDL and HTTP
for implementation

Web Services support most of the communication protocols and it can be


implemented using FTP as well as HTTP

Web services share business logic, data and processes through


programmatic interface across the network

Web Services follow a loosely coupled architecture

6
How Web Services work

Web service interfaces receive a standard XML message from the


networking environment.

Next, this XML data is transformed into a format that will be understood
by a particular back-end software system.

And optionally a reply message is returned.

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

WSDL (Web Services Description Language):


 An XML-based technology that defines:
- Web services interfaces
- data
- message types
- interaction patterns
- protocol mappings

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

UDDI (Universal Description, Discovery, and Integration):


 A Web services registry and discovery mechanism
 Used for storing and categorizing business information

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.).

SOAP communication Architecture can be broadly


classified as
1. SOAP client
2. SOAP server
3. Actual service

A SOAP client is a SOAP aware machine and is capable of


generating and sending SOAP requests to a SOAP server over
HTTP

A SOAP request is a type of SOAP message

Usually, there are only two types of SOAP messages: SOAP


request and SOAP response.

1
SOAP Architecture (Contd.).

A SOAP request is the message that a SOAP client sends to a


SOAP server and a SOAP response is the return message that
the SOAP server sends back to the SOAP client in response.

A SOAP server is also a SOAP aware machine and has the


capability to accept requests from SOAP clients and author
appropriate responses. These encoded responses go back to the
requesting SOAP client.

Inside the SOAP server there are three entities:


1. Service manager
2. Deployed services list
3. XML translator

1
SOAP Architecture (Contd.).

•The service manager is responsible for managing services against


requests . The service manager will read name of the SOAP service that
the SOAP client wants to invoke and check whether the required
service actually resides on this SOAP server.

•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.

•The XML translator is then responsible for converting the XML


structure of the SOAP request to that of the programming language,
that the programmer has used to implement the actual service.

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.

The service implementation, for example, may be in the form of COM


components or Java Bean components.

The XML translator is responsible for translating XML structures into


proper method invocation calls.

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.

Have a look at the arrow in the figure, which connects XML


translator to the actual service.

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.

Compare this to the arrow between SOAP client and SOAP


server, which crosses the boundary of an enterprise.

This is exactly the purpose of SOAP.

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

The SOAP envelope contains two parts


1. An optional header providing
information on authentication, encoding of
data, or how a recipient of a SOAP message
should process the message

2. body that contains the


The These messages can be
defined
message.using the WSDL specification

21
The Basic Structure of SOAP (Contd.).
A SOAP message:

May or may not contain an XML declaration

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

An implementation of the UDDI specification is


called UDDI Registry

25
What is UDDI? (Contd.).
UDDI is a unified and systematic way to find
service providers

UDDI permits businesses to register information


about themselves and their services in UDDI
Registries

26
What is UDDI? (Contd.).
UDDI specifies schemas to encode information
about businesses that deploy WebServices and
Schemas to encode information about WSs
themselves

It provides Query and update API for the registry


that describes how information can be accessed
and updated

UDDI is Based on XML, HTTP, IP, SOAP, WSDL


standards

27
What is UDDI? (Contd.).
Microsoft, IBM, and Ariba originally developed the UDDI
specification and was first published in September 2000

Later they formed UDDI.org and invited 12 other companies


to participate in the development of versions 2.0 and 3.0

In the summer 2002, UDDI.org turned over the


management
of of the specifications to OASIS
(Organization for UDDI
Advancement of Structured
Information Standards)
the

UDDI products based on the UDDI specification are offered


by a number of vendors including IBM, Microsoft, Oracle,
Fujitsu among others
28
What is WSDL?

Web Services Description Language is a


standard for describing the structure of the XML Data
Exchange between the two System using SOAP
message

WSDL is used to specify the exact message format,


internet protocol and address that client must use to
communicate with a particular website

WSDL document specifies how to use the Web


Service

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

Endpoint is made of two parts:

a) Abstract definitions of operations and messages

b) Binding of operations and messages to a


concrete network protocol and message encoding

31
Why WSDL?

• WSDL uses XML to describe interfaces

• Web service description enables automation of


communication details in application to application
communication

• Dynamic discovery and use

• Arbitration

32
Where is WSDL used?

WebService Requestor Webservice Provider


4) Invoke Webservice

Business Partner or Servlet JAXR


other System
SOAP Request WSDL
Document

3) Retrieve WSDL Definition

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:

You might also like