Infolink

 

Search This Blog

Aug 15, 2012

Web Services

A Web service is a method of communication between two electronic devices over a network.

The W3C  defines a "Web service" as "a software system designed to support interoperable  machine-to-machine  interaction over a network . It has an interface described in a machine-processable format (specifically Web Services Description Language, known by the acronym WSDL ).
Other systems interact with the Web service in a manner prescribed by its description using SOAP  messages, typically conveyed using HTTP with an XML serialization in conjunction with other Web-related standards.

Web Services can convert your application into a Web-application, which can publish its function or message to the rest of the world.

Web Services are published, found, and used through the Web.


What are Web Services?

Web services are application components
Web services communicate using open protocols
Web services can be used by other applications
XML is the basis for Web services

How Does it Work?


The basic Web services platform is XML + HTTP.

XML provides a language which can be used between different platforms and programming languages and still express complex messages and functions.

The HTTP protocol is the most used Internet protocol.

Four Basic Steps
                Web Services cleint script builds up the request
                Client Sends the request to server using HTTP
                Server replies and returns an XML document with results
                Client Parses XML


Why Web Services?

Interoperability has Highest Priority

When all major platforms could access the Web using Web browsers, different platforms could interact. For these platforms to work together, Web-applications were developed.

Web-applications are simple applications that run on the web. These are built around the Web browser standards and can be used by any browser on any platform.
Web Services take Web-applications to the Next Level

By using Web services, your application can publish its function or message to the rest of the world.

Web services use XML to code and to decode data, and SOAP to transport it (using open protocols).

With Web services, your accounting department's Win server's billing system can connect with your IT supplier's UNIX server.

Web Services have Two Types of Uses

Reusable application-components.

There are things applications need very often. So why make these over and over again?

Web services can offer application-components like: currency conversion, weather reports, or even language translation as services.

Connect existing software.

Web services can help to solve the interoperability problem by giving different applications a way to link their data.

With Web services you can exchange data between different applications and different platforms

What is SOAP?

SOAP is an XML-based protocol to let applications exchange information over HTTP.
Or more simple:
 SOAP is a protocol for accessing a Web Service.

SOAP stands for Simple Object Access Protocol
SOAP is a communication protocol
SOAP is a format for sending messages
SOAP is designed to communicate via Internet
SOAP is platform independent
SOAP is language independent
SOAP is based on XML
SOAP is simple and extensible
SOAP is a W3C standard


Web API is a development in Web services (in a movement called Web 2.0) where emphasis has been moving away from SOAP based services towards Representational State Transfer (REST) based communications. REST services do not require XML, SOAP, or WSDL service-API definitions.
Web APIs allow the combination of multiple Web services into new applications known as mashups
When used in the context of Web development, Web API is typically a defined set of Hypertext Transfer Protocol (HTTP) request messages along with a definition of the structure of response messages, usually expressed in an Extensible Markup Language (XML) or JavaScript Object Notation (JSON) format.
When running composite Web services, each sub service can be considered autonomous. The user has no control over these services. Also the Web services themselves are not reliable; the service provider may remove, change or update their services without giving notice to users. The reliability and fault tolerance is not well supported; faults may happen during the execution. Exception handling in the context of Web services is still an open research issue, although this can still be handled by responding with an error object to the clients.
Web services are a set of tools that can be used in a number of ways. The three most common styles of use are RPC, SOA and REST.

Remote procedure calls

RPC Web services present a distributed function (or method) call interface that is familiar to many developers. Typically, the basic unit of RPC Web services is the WSDL operation.
The first Web services tools were focused on RPC, and as a result this style is widely deployed and supported. However, it is sometimes criticized for not being loosely coupled, because it was often implemented by mapping services directly to language-specific functions or method calls. Many vendors felt this approach to be a dead end, and pushed for RPC to be disallowed in the WS-I Basic Profile.
Other approaches with nearly the same functionality as RPC are Object Management Group's (OMG) Common Object Request Broker Architecture (CORBA), Microsoft's Distributed Component Object Model (DCOM) or Sun Microsystems's Java/Remote Method Invocation (RMI).


Service-oriented architecture

Web services can also be used to implement an architecture according to service-oriented architecture (SOA) concepts, where the basic unit of communication is a message, rather than an operation. This is often referred to as "message-oriented" services.
SOA Web services are supported by most major software vendors and industry analysts. Unlike RPC Web services, loose coupling is more likely, because the focus is on the "contract" that WSDL provides, rather than the underlying implementation details.
Middleware analysts use enterprise service buses (ESBs) that combine message-oriented processing and Web services to create an event-driven SOA. One example of an open-source ESB are WSO2 ESB, Mule and Open ESB.

Representational state transfer (REST)


.
REST attempts to describe architectures that use HTTP or similar protocols by constraining the interface to a set of well-known, standard operations (like GET, POST, PUT, DELETE for HTTP). Here, the focus is on interacting with stateful resources, rather than messages or operations.
An architecture based on REST (one that is 'RESTful') can use WSDL to describe SOAP messaging over HTTP, can be implemented as an abstraction purely on top of SOAP (e.g., WS-Transfer), or can be created without using SOAP at all.
WSDL version 2.0 offers support for binding to all the HTTP request methods (not only GET and POST as in version 1.1) so it enables a better implementation of RESTful Web services.[5] However, support for this specification is still poor in software development kits, which often offer tools only for WSDL 1.1. 


No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...