Aug 8, 2012

Web Services

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.
  • Web Service is
  • Language Independent
  • Protocol Independent
  • Platform Independent
  • It assumes stateless service architecture.
History of Web Service or How Web Service comes into existence?

As i have mention before that Web Service is nothing but means for interacting with objects over the Internet.
  • Initially Object - Oriented Language comes which allow us to interact with two object within same application.
  • Component Object Model (COM) which allows to interact two objects on the same computer, but in different applications.
  • Distributed Component Object Model (DCOM) which allows to interact two objects on different computers, but within same local network.
  • which allows two object to interact internet. That is it allows to interact between two object on different computers and even not within same local network.
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.
  • In summary you can any use any web service which is available to use. You can make your own web service and let others use it. Example you can make Free SMS Sending Service with footer with your companies advertisement, so whosoever use this service indirectly advertise your company... You can apply your ideas in N no. of ways to take advantage of it.
Web Service Communication
Web Services communicate by using standard web protocols and data formats, such as
  • HTTP
  • XML
  • SOAP
Advantages of Web Service Communication
Web Service messages are formatted as XML, a standard way for communication between two incompatible systems. And this message is sent via HTTP, so that they can reach to any machine on the internet without being blocked by firewall.

Terms which are frequently used with web services:

What is SOAP?

SOAP is 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 details regarding using web service
  • Method and Properties provided by web service
  • URLs from which those method can be accessed.
  • Data Types used.
  • Communication Protocol used.
What is UDDI?

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

What is Discovery or .Disco Files?

Discovery files are used to group common services together on a web server. Discovery files .Disco and .VsDisco are XML based files that contains link in the form of URLs to resources that provides discovery information for a web service.

.Disco File (static)
  • .Disco File contains
  • URL for the WSDL
  • URL for the documentation
  • URL to which SOAP messages should be sent.
  • A static discovery file is an XML document that contains links to other resources that describe web services.
.VsDisco File (dynamic)

A dynamic discovery files are dynamic discovery document that are automatically generated by VS.Net during the development phase of a web service.

What is difference between Disco and UDDI?

Disco is Microsoft's Standard format for discovery documents which contains information about Web Services, while UDDI is a multi-vendor standard for discovery documents which contains information about Web Services.

What is Web Service Discovery Tool (disco.exe)?

The Web Services Discovery Tool (disco.exe) can retrieve discovery information from a server that exposes a web service.

What is Proxy Class?

A proxy class is code that looks exactly like the class it meant to represent; however the proxy class doesn't contain any of the application logic. Instead, the proxy class contains marshalling and transport logic. A proxy class object allows a client to access a web service as if it were a local COM object. The Proxy must be on the computer that has the web application.

What is Web Service Description Language Tool (wsdl.exe)?

This tool can take a WSDL file and generate a corresponding proxy class that you can use to invoke the web service. Alternate of generating Proxy class through WSDL.exe is you can use web reference. Web Reference automatically generates a proxy classes for a web service by setting a web reference to point to the web service.

Advantage of using Web Reference as compare to using WSDL.exe Tool is you can update changes done in web service class easily by updating web reference, which is more tedious task with WSDL.exe tool


No comments:

Post a Comment