Monday, December 22, 2008

Introduction to web services

Life Before Web Services

Traditional distributed architecture before web service is not universally interoperable. Technologies before web service like DCOM or Object Request Brokers (ORBs) based on the CORBA specification were solutions to distributed issues but these technologies has some problems which led to trying to find new technology ,for example:


COM is linked to Microsoft so we need a technology that is not related to any platform.


Corba usually has trouble with firewalls.


COM requires installation on the same machine and DCOM requires installation on the same network. So we need a more distributed model.


Some of these traditional technologies are not suitable for heterogeneous environment. So we need a way of communication between heterogeneous applications.


So there was a need to a technology that resolves these problems and enables application-to-application interaction on the Web. We need away to deal with different communication protocols. So web service uses a technology that solved these issues.


If many applications need a piece of logic .Why make this over and over again? Why there is no such a thing that can offer applications some components that can be used many times. The solution for all that is Web Services.

Advantages of Web Services:

1-Interoperability: This is done by giving different applications a way to link their data. Also any Web service can interact with any other Web services.


2-Reusability: we don't have to recreate business logic that somebody else has already created so it helps us generate our application faster.


3-http-based: Web service based on http and most of the Internet's proxies and firewalls allow HTTP traffic.


4-xml –based: Web services uses xml as a base in its technology, xml is a standard language and easy to use and learn and most widely used.



5-loosely coupled: As it allows the web service to be in a place and the client in another. So changes in web service implementation don't affect the clients.



6-Platform and language independent: so we can use web service to communicate between any types of applications reside in different platforms


Service: is the endpoint of a connection. It is a function that is well defined and does not depend on the state of other services.


Web services: is the integration of some services that are used to make them accessible using standard internet technology. So web service is a piece of software that can be exposed, discovered and consumed.

The major web services technologies


1-xml (Extensible Markup Language)


2-SOAP (Simple Object Access Protocol)


3-WSDL (Web Service Definition Language)


4-UDDI (Universal Description, Discovery and Integration) Directory lookup for web service.

Steps in Web Services communication


1-The service Provider exposes a web service and publishes it to a directory of services (UDDI directory).It uses WSDL to define its web service.


2-The service consumer searches for a service using the UDDI directory


3-The UDDI directory sends a WSDL document to the service consumer .This WSDL document contains information about the service, where to find it and how to call it.


4-The service consumer sends a SOAP message using the xml in the WSDL document .This message contains a request to the service provider.


5-The service provider send a response back to the service consumer.



No comments: