Saturday, October 31, 2015

Web Services Model In ASP.NET

The Web Services Model OR architectures



The Web Services architecture is based upon the interactions between three roles:
Service provider, service registry and service requestor.

The interactions involve the publish, find and bind operations.

Roles in Web Services Architecture
There are three major roles within the web service architecture:
Service Provider
This is the provider of the web service. The service provider implements the service and makes it available on the Internet.
Service Requestor
This is any consumer of the web service. The requestor utilizes an existing web service by opening a network connection and sending an XML request.
Service Registry
This is a logically centralized directory of services. The registry provides a central place where developers can publish new services or find existing ones. It therefore serves as a centralized clearing house for companies and their services.

Operations in a Web Service Architecture
For an application to take advantage of Web Services, three behaviors must take place:
publish, find and binding.
In detail, these operations are:
Publish. To be accessible, a service description needs to be published so that the
service requestor can find it.
Find. In the find operation, the service requestor retrieves a service description directly
or queries the service registry for the type of service required
Bind. In the bind operation the service requestor invokes or initiates an interaction with the service at runtime

History of the Web Services Specification

Web Services Description Language (WSDL); Universal Description and Discovery (UDDI); and SOAP formed the original Web Services specification. This section provides a history.
Web Services Description Language (WSDL)
For our purposes, we can say that a WSDL file is an XML document that describes a set of SOAP messages and how the messages are exchanged.
The Web Services Description Language (WSDL) forms the basis for the original Web Services specification. The following figure illustrates the use of WSDL. At the left is a service provider. At the right is a service consumer. The steps involved in providing and consuming a service are:
  1. A service provider describes its service using WSDL. This definition is published to a repository of services. The repository could use Universal Description, Discovery, and Integration (UDDI). Other forms of directories could also be used.
  2. A service consumer issues one or more queries to the repository to locate a service and determine how to communicate with that service. 
  3. Part of the WSDL provided by the service provider is passed to the service consumer. This tells the service consumer what the requests and responses are for the service provider.
  4. The service consumer uses the WSDL to send a request to the service provider.
  5. The service provider provides the expected response to the service consumer.


Universal Description, Discovery, and Integration (UDDI)

Universal Discovery Description and Integration is the yellow pages of Web services. As with traditional yellow pages, you can search for a company that offers the services you need, read about the service offered and contact someone for more information. You can, of course, offer a Web service without registering it in UDDI, just as you can open a business in your basement and rely on word-of-mouth advertising but if you want to reach a significant market, you need UDDI so your customers can find you.
A UDDI directory entry is an XML file that describes a business and the services it offers. There are three parts to an entry in the UDDI directory. The "white pages" describe the company offering the service: name, address, contacts, etc. The "yellow pages" include industrial categories based on standard taxonomies such as the North American Industry Classification System and the Standard Industrial Classification. The "green pages" describe the interface to the service in enough detail for someone to write an application to use the Web service.

 

 

SOAP


SOAP at one time stood for Simple Object Access Protocol.
Soap is the communications protocol for XML Web services.
SOAP essentially provides the envelope for sending the Web Services messages. SOAP generally uses HTTP
The next figure provides more detail on the messages sent using Web Services. At the left of the figure is a fragment of the WSDL sent to the repository. It shows a CustomerInfoRequest that requires the customer's account to object information. Also shown is the CustomerInfoResponse that provides a series of items on customer including name, phone, and address items.

At the right of this figure is a fragment of the WSDL being sent to the service consumer. This is the same fragment sent to the repository by the service provider. The service consumer uses this WSDL to create the service request shown above the arrow connecting the service consumer to the service provider. Upon receiving the request, the service provider returns a message using the format described in the original WSDL. That message appears at the bottom of the figure.
XML is used to define messages. XML has a tagged message format.
Examples for 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.

In short
What is SOAP?

SOAP (simple object access protocol) 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.

What is WSDL? 

WSDL stands for Web Service Description Language, 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.

What is UDDI?

UDDI allows you to find web services by connecting to a directory.




1 comment:

Shi Ketsueki said...

I truly like to reading your post. Thank you so much for taking the time to share such a nice information. I'll definitely add this great post in my article section.
it company in jabalpur