Web Services

Web Services

Web Service Introduction

Web Service is very simply service that made available over the network and access through the network

There are two types of Web Services.
  • SOAP Web Service - JAX-WS
  • Restful Web Service - JAX-RS

Two different machine, two piece of code, two different application run on two different server to be able to talk each other.

These two application can talk each other over the network by using web service technology. Best part of web service is interoperability. Which means JAVA piece of code can actually call .NET web services. .NET piece of code can actually call the JAVA web services. C++ application not a web service can call JAVA web service or .NET web service.

You can actually have different application written in different technologies that communicate with each other during execution time.The client may be written in any language with the appropriate support libraries. Indeed, a major appeal of web services is language transparency: the service and its clients need not be written in the same language. Language transparency is the key to web service interoperability; that is, the ability of web services and requesters to interact seamlessly despite differences in programming languages, support libraries, and platforms.

There is no magic in language transparency, of course. If a SOAP-based web service written in Java can have a Perl or a Ruby consumer, there must be an intermediary that handles the differences in data types between the service and the requester languages. XML technologies, which support structured document interchange and processing, act as the intermediary. For example, in a typical SOAP-based web service, a client transparently sends a SOAP document as a request to a web service, which transparently returns another SOAP document as a response. In a REST-style service, a client might send a standard HTTP request to a web service and receive an appropriate XML document as a response.

Several features distinguish web services from other distributed software systems.

1. Open infrastructure

Web services are deployed using industry-standard, vendor-independent protocols such as HTTP and XML, which are ubiquitous and well understood.

2. Language transparency

Web services and their clients can interoperate even if written in different programming languages.

3. Modular design

Web services are meant to be modular in design so that new services can be generated through the integration and layering of existing services.

Web services are inherently distributed systems that communicate mostly over HTTP but can communicate over other popular transports as well.

Web Service Jargon

WSDL - Web Service Description Language

WSDL document contains contract of web service. When you create a web service, you share the WSDL document of that web service to consumer. It is a XML document

UDDI - Universal Description Discovery and Integration

Register your web service in UDDI. Anybody who wants to consume that web service.

What needs to be send?

You need to exchange in the format that all the different technologies can understand. Whenever you are sending any information across the network from client to the web service and the return type back to the client, it has to be in XML format. It has to be in language neutral format which is XML again.

How to send it?

There is a specification about how you need to send all these different input types and output arguments. It's basically any data type needs to be send in specific XML format. It's really a protocol called SOAP.

SOAP - Simple Object Access Protocol

It's way in which different technologies can access objects and data

Who does the conversation? How do you do the conversation from Java object to a SOAP message?

The conversation has actually done by an intermediate class called SEI.

SEI - Service Endpoint Interface

It access an interface to your web service end point

Summary

WSDL - It describes what web service is in XML format that different technologies can understand.
UDDI - It is a directory where any publisher can publish their web services and consumer can query this directory and get access all the different web services
SOAP- It's basically a protocol. It's a language. It's a XML format that is used to encode and decode different messages. You are making a call to web service. SOAP messages that gets transmitted over the network
SEI- It's an interface to the service end point. It provides way for your client application respective of the technology to call the web service. So depending on technology you get SEI for that technology. For Java application has a Java SEI and .NET application has a .NET SEI.

0 comments:

Post a Comment

Search This Blog

Powered by Blogger.