What
is Web Service?
Web Service is an application that is designed to
interact directly with other applications over the internet. In simple sense,
Web Services are means for interacting with objects over the Internet. The Web service consumers are able to invoke method calls on
remote objects by using SOAP and HTTP (HTTP-POST, HTTP-GET)
over the Web.
Web
Service is:=
- Language Independent
- Protocol Independent
- Platform Independent
- It assumes stateless service architecture.
Web Service Communication
Web Services communicate by using standard web protocols and data formats, such as
Web Services communicate by using standard web protocols and data formats, such as
- HTTP
- XML
- SOAP
- WSDL
- UDDI
Standard Web Protocols:
Ø HTTP (Hyper Text Transfer
Protocol):
HTTP is the World Wide Web standard for communication over the
Internet. HTTP is standardized by the World Wide Web Consortium (W3C).
Ø XML (Extensible Markup Language):
XML is a well known standard for storing, carrying, and
exchanging data. XML is standardized by the W3C.
Ø SOAP (Simple Object Access Protocol):
SOAP is a remote function calls that invokes method and execute
them on Remote machine and translate the object communication into XML format.
In short, SOAP are way by which method calls are translate into XML format and
sent via HTTP.
Ø WSDL(Web Services
Description Language):
WSDL (Web Services Description
Language) is an XML-based language used to define web services and to describe
how to access them. WSDL is a standard by which a web
service can tell clients what messages it accepts and which results it will
return. WSDL contains every detail regarding using web service and Method and
Properties provided by web service and URLs from which those methods can be
accessed and Data Types used. WSDL is a suggestion by Ariba, IBM
and Microsoft for describing services for the W3C XML Activity on XML
Protocols.
Ø UDDI(Universal Description, Discovery
and Integration):
Ø
UDDI provides a XML based standard mechanism for
clients to dynamically find other web services.
Ø
UDDI is a directory service where businesses can
register and search for web services.
Ø
UDDI is a public registry, where one can publish
and inquire about web services.
Ø
UDDI is platform independent, open framework.
Ø
UDDI can communicate via SOAP, CORBA, Java RMI
Protocol. UDDI uses WSDL to describe interfaces to web services.
UDDI has
two parts:
Ø
A registry of all a 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
Example of Web Service:
- Weather Reporting: You can use Weather Reporting web service to display weather information in your personal website.
- Stock Quote: You can display latest update of Share market with Stock Quote on your web site.
- News Headline: You can display latest news update by using News Headline Web Service in your website.
Advantages
of Web Service:
Web Service messages are formatted as XML, a standard way for communication between two incompatible system. And this message is sent via HTTP, so that they can reach to any machine on the internet without being blocked by firewall.