WebServices/SOA


Before i am going to make comprehensible about web services based on SOA design pattern, i would like to denote the benefits of using web services.
  • Exposing functions on to network
Entire functions in web service is fully addressable and enables external entities to address them being a part of a neighborhood or stranger. So feasibility of invoking hosted services over HTTP is kind of an added advantage for invoking and activating using HTTP request. So web services allow users to exhibit the functionality of your existing code over the network. So once it is exposed on network, others can get use of it.
  • Connecting Different Application

Elimination of boundaries heritage in heterogeneous systems is the main goal provided by web services. So that web services allows talking with different applications and share data and services among themselves. Other applications written in various languages and run in different platforms can work with web services since it really does not matter for them. For example java application can talk with VB or .NET and vice versa. So web services are used to make the application platform and technology independent.

  • Standardized protocols

Web services use industry standard protocols to communicate with each other which enhance its multi platform and multi language capabilities in advance. HTML, XML based tags, description and service discovery layers are some of them. Quality enhancement, heteroginity, scalability and reduction of the cost due to competition are advantages these common protocols give.

  • Low cost communication

Web Services uses SOAP over HTTP protocol for the communication, so you can use your existing low cost internet for implementing Web Services. This solution is much less costly compared to proprietary solutions like EDI/B2B.

  • Loosely Coupling

Due to enability of accessing via standard internet communication protocols like XML and SOAP, it enhances flexibility (sounds express its easiness skill to work with any language). In addition to that as they are developed module wise which encapsulate discrete functionality, they help module wise integrations and the bond with existing modules is comparably less. These Web Services can be developed in any technologies (like c++, Java, .NET, PHP, Perl etc.) and any application or Web Services can access these services. So, the Web Services are loosely coupled application and can be used by applications developed in any technologies.

Web services Introduction

Web services are the amalgamation of eXtensible Markup Language (XML) and HyperText Transfer Protocol HTTP that can convert your application into a Web-application, which publish its function or message to the rest of the world.

-----standard definition for web services

This says that using XML and HTTP, it is converted your application into a standard web application and meanwhile available functions are depicted into the rest of the world. In other words, we can say, web services are just Internet Application Programming Interfaces (API) that can be accessed over a network, such as Internet and intranet, and executed on a remote system hosting the requested services. Web applications are applications that run on the web. Web Services are OS and browser independent service which means it can run on any browser without the need of making any changes.

Web service fundamental elements

  • HTTP (Hyper Text Transfer Protocol)
  • SOAP (Simple Object Access Protocol)
  • UDDI (Universal Description, Discovery and Integration)
  • WSDL (Web Service Definition Language)

I am not going to explain about HTTP, but I would like to make you aware about other three elements in detail since they are new for novels.

I will make you guys aware about the elements and procedure happens by giving an example.


As you can see, the interaction between service provider and consumer happens in a way that using wsdl difinition language. There service provider published its services in UDDI directory using WSDL. Suppose like this, this directory is something like a yellow pages where vendors publish their advertisements in order to make aware the consumers about their products. Similer thing happens here, service providers include services in UDDI (yellow pages according to our example) using WSDL. When consumer looks in yellow pages he/she sees that particular vendor is the one he/she is looking for to fullfill him/her services. So wht person (consumer) does is , calling to that vendor by getting the telephone numberer having improved about vendors' products.

That is what illustrated in above diagram, it is very simple if you remove all these non familiar words. But you have to familiar with them later, because you are going to use this yellow pages constantly to get services from vendors, in our case to get the maximum benefit from web services.

Now i am going to explain what above diagram shows in term of web services. After service provider publishes services in UDDI using WSDL format, A service consumer issues one or more queries to the directory to locate a service and determine how to communicate with that service.

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. The service consumer uses the WSDL to send a requestto the service provider and the service provider provides the expected response to the service consumer.

The idea of having an UDDI directory is for 'universal discovering' the web services using WSDL. So UDDI directory can be used to obtain contact information and web services available for various organizations. How much discovery will be used in the early days of Web Services is open to discussion. Nevertheless, even without the discovery portion, the UDDI registry is a way to keep up-to-date on the Web Services your organization currently uses.

All the messages shown in the above figure are sent using SOAP. (SOAP at one time stood for Simple Object Access Protocol. Now, the letters in the acronym have no particular meaning .) SOAP essentially provides the envelope for sending the Web Services messages. SOAP generally uses HTTP , but other means of connection may be used. HTTP is the familiar connection we all use for the Internet. In fact, it is the pervasiveness of HTTP connections that will help drive the adoption of Web Services.

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 directory. 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 directory 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.

Comments