What
is Web Service
Web
Services are open standard based applications.
(open
standards : XML, SOAP, HTTP, etc.)
Web
Services can convert your application into a Web-application, which
can publish its function or message to the rest of the world.
The
basic Web Services platform is XML + HTTP.
There
are lot of definitions we can find for What is a Web Service and
below mention 2 of them.
“Web
services are XML-based information exchange systems that use the
Internet for direct application-to-application interaction. These
systems can include programs, objects, messages, or documents. ”
“A
web service is a collection of open protocols and standards used for
exchanging data between applications or systems. ”
So
what is a Web Service:
*
Web service is a application components
*
Available over the Internet or intra-net
*
It uses a standardized XML messaging system
*
It communicates using open protocols
*
It is self-describing via a common XML grammar
*
It is not tied to any one operating system or programming language
*
It can be used by other applications
Components
of Web Services :
The
basic Web services platform is XML + HTTP. All the standard Web
Services works using following components ;
SOAP
(Simple Object Access Protocol)
UDDI
(Universal Description, Discovery and Integration)
WSDL
(Web Services Description Language)
Why
Web Services :-
*
Expose the existing functions to the network, since Web Services take
Web-applications to the Next Level
Web
Services allows to expose the existing functionality or message over
the network. Once it is exposed on the network, other application can
use the functionality of your program.
*
Interoperability
Web
Services allows different applications to talk to each other and
share data and services among themselves. Other applications can also
use the services of the web services. For example .NET application
can talk to java web services and vice versa.
So,
Web services is used to make the application platform and technology
independent.
*
Standardized Protocol
Web
Services uses standardized industry standard protocol for the
communication. All the four layers (Service Transport, XML Messaging,
Service Description and Service Discovery layers) uses the well
defined protocols. This gives the business many advantages like wide
range of choices, reduction in the cost due to competition and
increase in the quality.
*
Low Cost of communication
Web
Services uses SOAP over HTTP protocol for the communication, so you
can use your existing low cost Internet for implementing Web
Services.
Web
services' special behavioral characteristics :
1.
XML-based
Web
Services uses XML at data representation and data transportation
layers.
Using
XML eliminates any networking, operating system, or platform binding.
2.
Loosely coupled
The
web service interface can change over time without compromising the
client's ability to interact with the service.
Adopting
a loosely coupled architecture tends to make software systems more
manageable and allows simpler integration between different systems.
3.
Coarse-grained
Web
services technology provides a natural way of defining coarse-grained
services that access the right amount of business logic.
Basically,
coarse-grained systems will have less method calls than a
fine-grained system.
Clearly
coarse-grained methods will be fewer and do more work than the
broken-down fine-grained versions.
Coarse
grained interfaces will generally be better where calls are
expensive, in a distributed system.
4.
Ability to be synchronous or asynchronous
In
synchronous invocations, the client blocks and waits for the service
to complete its operation before continuing. Asynchronous operations
allow a client to invoke a service and then execute other functions.
Asynchronous clients retrieve their result at a later point in time,
while synchronous clients receive their result when the service has
completed. Asynchronous capability is a key factor in enabling
loosely coupled systems.
5.
Supports Remote Procedure Calls (RPCs)
Web
services allow clients to invoke procedures, functions, and methods
on remote objects using an XML-based protocol.
6.
Supports document exchange
One
of the key advantages of XML is its generic way of representing not
only data, but also complex documents. These documents can be simple,
such as when representing a current address, or they can be complex,
representing an entire book or RFQ. Web services support the
transparent exchange of documents to facilitate business integration.