Sunday, March 20, 2011

Webservices - Part-1

Creating and consuming java webservices.

What is a Webservice ?

A web service is a collection of protocols and standards used for exchanging data between applications or systems. WebServices are published, described and located over the internet.

Characteristics of a Webservice.

A Web Service is accessible over the internet or intranet both.
Web Services communicate using platform-independent and language-neutral Web protocols such as XML-RPC, HTTP or SOAP.
A Web Service shares schemas and contracts/interface that can be called from another program.
A Web Service is registered and can be located through a Web Service Registry or UDDI.
A Web Service supports loosely coupled connections between two different systems or applications.

Technologies associated with a Webservice.

XML (eXtensible Markup Language)
It's a markup language that underlies most of the specifications used for Web services. It is also platform neutral and can be used by any system or application.

SOAP (Simple Object Access Protocol)
SOAP is a network, transport, and programming language and platform neutral protocol that allows a client to call a remote service. The request response message format is always in XML format.

WSDL (Web services description language)
An XML-based interface and implementation description language. The service provider uses a WSDL document in order to specify the operations a Web service exposes.

UDDI (universal description, discovery, and integration)
Both a client-side API and a SOAP-based server implementation that can be used to store and retrieve information on service providers and Web services.

Advantages of Web services

WebServices communicate of over http protocol and can easily cross network boundaries. These are easy to integrate and use.
Web services support only the data types defined in the XSD (XML Schema definition), limiting the number of objects that can be serialized. This makes them interoperable across platforms.
Highly reliable due to the fact that Web services are always hosted in controlled environments.
Provides extensibility by allowing us to intercept the SOAP messages during the serialization and deserialization stages.
Easy to create, deploy and consume.

Continue reading to create your own simple webservice.

No comments:

Post a Comment