Related Previous Article
Web: network of computers accessed across the globe
HTTP: communication among the computers is done via protocols called HTTP
Service: a pieace of code or logic to solve the system problesm is called a service
Web service : a piece of business logic located in the remote computer on internet which is accessed
Using standard based internet protocols such as HTTP or SMTP.
A web service is a mechanism for transmitting data between two different machines regardless of the underlying operating system or software.
Importance of Web services:
Web services enable programmers to quickly deliver a more sophisticated application in less time
Programmer no longer has to create and maintain functions
Web services that perform functions in multiple applications
The biggest advantage of WS over many other is ti is platform independent , to programs can communicate through
WS regardkess if what language they are written in.
Components of web services
SOAP is XML based system to system communication protocol . Web services rely on SOAP for XML message transfer, SOAP has become essential tool for web service.
WSDL represents a contract between the service requestor and the service provider
WSDL is a specification defining how to describe web services in a common XML grammar. WSDL describes four critical pieces of data:
• Interface information describing all publicly available functions
• Data type information for all message requests and message responses
• Binding information about the transport protocol to be used
• Address information for locating the specified service
WSDL in nutshell
UDDI (Universal Description, Discovery and Integration) is a platform-independent, XML based registry service where companies can register and search for Web services.
• UDDI is a directory for storing information about web services
• UDDI communicates via SOAP
• UDDI is a directory of web service interfaces described by WSDL
process of web services
The Service Provider generates the WSDL describing the application or service and registers the WDSL in UDDI directory or Service Registry.
The Service Requestor or client application which is in need of web service contacts the UDDI and discovers the web service.
The client based on the web service description specified in the WSDL sends a request for a particular service to the web service application listener in SOAP message format.
The web service parses the SOAP message request and invokes a particular operation on the application to process that particular request. The result is packed in an appropriate SOAP response message format and sent to the client.
The client parses the SOAP response message and retrieves the result or error messages if any.
Related Previous Article
Example of Web Services
Weather Reporting: Suppose we want to display the weather information in our website then we can do that using a weather reporting Web Service.
Stock Quote: We can display the latest update of the shares market with a stock quote on our web-site.
News-Headline: If we want to display the latest news updates in our web-site then we can do this using a News-headline Web Service.
Currency conversion: By consuming a live currency conversion Web Service, we can convert various currency rates in our application.
Web Service Communication
Two objects interact with each other on the internet using a standard web protocol and data format, these are:
Terms associated with a Web Service
The following terms are related to Web Services.
It stands for Simple Object Access Protocol.
SOAP is the medium by which method calls are translated into XML format and sent via HTTP.
SOAP is remote function calls that invoke methods and execute them on the remote machine and translate the object communication into XML format.
It stands for Web Service Description Language.
As the name suggests, it is a language that describes a particular Web Service.
It is a standard by which a Web Service tells a client what message it will accept and which result it will return.
It contains all the details regarding the use of a Web Service that includes:
Methods and properties that a Web Service provides.
URLs from which these methods can be accessed by consuming the Web Service.
What data type has been used in the Web Service.
The communication protocol used.
It enables the creation of searchable Web Services registries.
This enables us to find the Web Service by connecting to a directory.
4. Discovery file or .Disco file
Discovery files are used to group common services on the web-server.
This is XML based file that contain link in the form of URLs to resources that provide discovery information for a Web Service.
Disco file(static): It is an XML document that contains links to other resources that describe Web Service.
VsDisco file(dynamic): Dynamic discovery files are dynamic documents that are automatically generated by VS.NET during the development process of the Web Service.
Web service description language(WSDL) is a xml based language for providing complete description of webservice to client application.
Description contains which data types used,
method names and address in webservice.
Simple object access protocol is the formatting
protocol which provides standards for sending
request and receiving response between client and
Hyper text transfer protocol is used as a
transport to carry request in form of soap
message from client to webserver and response
from webserver to client.
Universal description discovery and integration is
used for describing the services and is platform
Mechanism of HTTP, SOAP in webservice:
1.Client application method call will go to proxy,
proxy will convert method call to xml format that
is soap message.
2.Soap message will reach webserver via HTTP
3.Webserver will create object of webservice and
method is executed.
4.The result in the form of soap format is given to
client back over HTTP.
The methods present in webservice which are to
be exposed to client application are attributed
Public void mymethod()
"Hope for the best.. Prepare for the worst.."