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

Web Service

Web services enable interoperable distributed applications by allowing communication between clients and servers across different programming languages. They utilize standardized protocols like SOAP and REST, facilitating data exchange in XML format. Web services enhance business functionality, promote interoperability, and reduce communication costs across diverse platforms.

Uploaded by

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

Web Service

Web services enable interoperable distributed applications by allowing communication between clients and servers across different programming languages. They utilize standardized protocols like SOAP and REST, facilitating data exchange in XML format. Web services enhance business functionality, promote interoperability, and reduce communication costs across diverse platforms.

Uploaded by

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

Web Service

Silicon Institute of Technology


Introduction
• Web Service is the technology that allows us
to build interoperable distributed applications.
• A distributed application consists of one or
more local or remote clients that
communicate with one or more servers on
several machines linked through a network.
Introduction
• Every programming language has added
support to build distributed application.
• Anything that is accessible irrespective of
platform and programming language is called
interoperability.
Why do you need a Web Service?

• Modern day business applications use variety


of programming platforms to develop web-
based applications.
• Some applications may be developed in Java,
others in .Net, while some other in Angular JS,
Node.js, etc.
• The heterogeneous applications need some sort
of communication to happen between them.
• Since they are built using different development
languages, it becomes really difficult to ensure
accurate communication between applications.
• Here is where web services come in.
• Web services provide a common platform that
allows multiple applications built on
various programming languages to have the
ability to communicate with each other.
What is Web Service?

• Web service is a standardized medium to


propagate communication between the client
and server applications on the WWW (World
Wide Web).
• A web service is a software module that is
designed to perform a certain set of tasks.
• The client would invoke a series of web service
calls via requests to a server which would host
the actual web service.
• As an example, Amazon provides a web
service that provides prices for products sold
online via amazon.com. The front end or
presentation layer can be in .Net or Java but
either programming language would have the
ability to communicate with the web service.
• The main component of a web service design
is the data which is transferred between the
client and the server, and that is XML.
Before Web Services
CORBA- CORBA stands for Common Object
Request Broker Architecture.
• After socket programming , the first API that
has release by java to support Distributed
programming is CORBA.
• But CORBA seems to be complicated
and quite messy. This makes CORBA quickly
vanish from market.
RMI

RMI stands for Remote Method Invocation.


After CORBA, SUN released RMI as an API to
support distributed programming.
It allows a java object to be exposed over the
network.
Sun designed RMI keeping in view of all the
complexities and drawbacks in CORBA and
ensured those will not re-introduced in RMI.
Out of its simplicity, it introduced certain dis-
advantages as well.
The server would not providing any
infrastructural services like security or
connection pooling or transactions and these
has to be coded by developer itself, which
would be so costly and huge amount of effort
is required.
EJB

• EJB stands for Enterprise java Bean, Which is


next to RMI.
• But the problem with EJB is when you expose
an object as EJB, it can be accessed over the
network by other programs. The other
programs which wants to access the EJB
object should also java applications only and
non-java programs can not access EJB.
Web services
• Web services also allows a program to expose
objects over the network , but the difference
between other distributed objects (RMI and
EJB) and web service distributed object is
these are not only platform independent ,
these are even language independent.
• Which means you can write web service
object using c, c++ , perl, python, php ,java
e.t.c and we can expose over the network .
• In order to access this, the other program
could be written in any of the programming
language like c , c++ , perl or java e.t.c.
Architecture of Web service based
applications
Programs accessing web
service(consumer)
(can be written in
java/c/c++/python/.net)

Web Service exposed over


the network.
(can be written in
java/c/c++/python/.net)
Evolution
• To build interoperable distributed applications, every software
vendor in the industry started defining their own standards.
Let us say SUN has defined its own standards, microsoft
defined its own standard and IBM came with its own standard
e.t.c.
Vendor SUN Microsoft IBM

Transport Protocol HTTP FTP SMTP

Language for exchange XML MSXML CSV


data

Description JWSDL MSWSDL IBM4SDL


• Web services use SOAP (Simple Object Access
Protocol) for sending the XML data between
applications.
• The data is sent over normal HTTP/HTTPS.
• The data which is sent from the web service to
the application is called a SOAP message.
• The SOAP message is nothing but an XML
document.
• Since the document is written in XML, the client
application calling the web service can be written
in any programming language.
Type of Web Service

• There are mainly two types of web services.


• SOAP web services.
• RESTful web services.
Web Service Components

There are three major web service components.


• SOAP
• WSDL
• UDDI
Architecture
SOAP

• SOAP is an acronym for Simple Object Access


Protocol.
• SOAP is a XML-based protocol for accessing
web services.
• SOAP is a W3C recommendation for
communication between applications.
WSDL

• WSDL is an acronym for Web Services


Description Language.
• WSDL is a xml document containing
information about web services such as
method name, method parameter and how to
access it.WSDL is a part of UDDI. It acts as a
interface between web service applications.
• WSDL is pronounced as wiz-dull.
UDDI

• UDDI is an acronym for Universal Description,


Discovery and Integration.
• UDDI is a XML based framework for
describing, discovering and integrating web
services.
• UDDI is a directory of web service interfaces
described by WSDL, containing information
about web services.
SOAP (Simple Object Access Protocol)
• SOAP stands for Simple Object Access
Protocol. It is a XML-based protocol for
accessing web services.
• SOAP is a W3C recommendation for
communication between two applications.
• SOAP is XML based protocol. It is platform
independent and language independent. By
using SOAP, you will be able to interact with
other programming language applications.
Advantages of Soap Web Services

• WS Security: SOAP defines its own security


known as WS Security.
• Language and Platform independent: SOAP
web services can be written in any
programming language and executed in any
platform.
Disadvantages of Soap Web
Services
• Slow: SOAP uses XML format that must be
parsed to be read. It defines many standards
that must be followed while developing the
SOAP applications. So it is slow and consumes
more bandwidth and resource.
• WSDL dependent: SOAP uses WSDL and
doesn't have any other mechanism to discover
the service.
RESTful Web Services

• REST stands for REpresentational State


Transfer.
• REST is an architectural style not a protocol.
Advantages of RESTful Web
Services
• Fast: RESTful Web Services are fast because
there is no strict specification like SOAP. It
consumes less bandwidth and resource.
• Language and Platform independent: RESTful
web services can be written in any
programming language and executed in any
platform.
• Can use SOAP: RESTful web services can use
SOAP web services as the implementation.
• Permits different data format: RESTful web
service permits different data format such as
Plain Text, HTML, XML and JSON.
SOAP vs REST Web Services
SOAP vs REST Web Services
Web Services Advantages

• Exposing Business Functionality on the


network – A web service is a unit of managed
code that provides some sort of functionality
to client applications or end users.
• This functionality can be invoked over the
HTTP protocol which means that it can also be
invoked over the internet.
• Interoperability amongst applications – Web
services allow various applications to talk to each
other and share data and services among
themselves.
• A Standardized Protocol which everybody
understands – Web services use standardized
industry protocol for the communication.
• Reduction in cost of communication – Web
services use SOAP over HTTP protocol, so you can
use your existing low-cost internet for
implementing web services.
• https://www.guru99.com/what-is-api.html

You might also like