Web Services

Web Services Seminar report
Web Services convert an application into a Web-application containing self contained and self describing application components. Web service is a function at a network address over the web or a message to the rest of the world. The basic Web Services platform is XML + HTTP. The XML provides a language used between different platforms and programming languages and express complex messages and functions. The HTTP protocol is the most used Internet protocol. The services used to integrate Web-based applications using the XML, SOAP, WSDL and UDDI open standards over an Internet protocol backbone where XML(Extended Manipulation Language) is used to tag the data, SOAP (Simple Object Access Protocol) is used to transfer the data, WSDL(Web Services Description Language) is used for describing the services available and UDDI (Universal Description, Discovery and Integration) is used for listing what services are available. It act as a mean for business communication with each other and with clients. Web services allow organizations to communicate data without intimate knowledge of each others IT systems behind the firewall.

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. The W3C also states, We can identify two major classes of Web services, REST-compliant Web services, in which the primary purpose of the service is to manipulate XML representations of Web resources using a uniform set of stateless operations; and arbitrary Web services, in which the service may expose an arbitrary set of operations.

Web services do not provide the user with a GUI but developers add services to a GUI and they can share business logic data and processes through programmatic interface across a network. Different applications from different sources communicate each other through XML without any browser or HTML. Also with web services data transmission between different applications and different platforms are also takes place. They are also called as application services. With Web services, for example an accounting department's Win 2k server's billing system can connect with IT supplier's UNIX server. Mainly two uses for web services:application components are reusable-things that application need very often for eg:currency conversion,weather reports, or even language translation as services ; Connection establish through existing software by solving the interoperability problem by giving different applications a way to link their data.

One development in web services is web API based with simpler representational state transfer communications (REST). They do not require XML-based Web services protocols such as SOAP and WSDL to support light-weight services. The combination of multiple web services into new applications known as mashups is allowable in Web API. Basically web services have three basic platform elements:SOAP,WSDL,UDDI. SOAP is an XML-based protocol to let applications exchange information over HTTP. For accessing web service SOAP is used. It is a communication protocol with a format for sending messages.They are designed to communicate through internet and has no platform dependency. It is simple,extensible and allows to get around firewalls for transferring data.Both SOAP and WSDL are W3C standard. WSDL is XML-based language for locating and describing web services. UDDI is a directory service with interfaces where companies register and search for web services. Also store information and communicate through SOAP built with Microsoft .NET platform.

Non REST Web services complained web service is complex and based upon large software vendors or integrators, rather than typical open source implementations. Also a lot of concern about the performance due to web services XML usage as a message format and the use of SOAP/HTTP in enveloping and transporting. Web Service component seen in any application and are created regardless of programming language. We can use ASP.NET to create a simple Web Service example that converts the temperature from Fahrenheit to Celsius, and vice versa:
Code:
<%@ WebService Language="VBScript" Class="TempConvert" %>

Imports System
Imports System.Web.Services

Public Class TempConvert :Inherits WebService


Public Function FahrenheitToCelsius
(ByVal Fahrenheit As String) As String
dim fahr
fahr=trim(replace(Fahrenheit,",","."))
if fahr="" or IsNumeric(fahr)=false then return "Error"
return ((((fahr) - 32) / 9) * 5)
end function

Public Function CelsiusToFahrenheit
(ByVal Celsius As String) As String
dim cel
cel=trim(replace(Celsius,",","."))
if cel="" or IsNumeric(cel)=false then return "Error"
return ((((cel) * 9) / 5) + 32)
end function

end class
To run the application use a .NET server. The first line tells it is a webservice written in VBScript with a class name TempConvert. The next two lines import the namespace "System" and "System.Web.Services" from the .NET framework. The "TempConvert" class used is a WebService class type. This application has two functions. One to convert from Fahrenheit to Celsius, and one to convert from Celsius to Fahrenheit.The only difference from a normal application is that this function is defined as a "WebMethod()". ASP.NET has automatically created a WSDL and SOAP request.

Web services used to convert applications into web applications and use XML to send messages between applications. Also one can create a web service from a written application.

References
http://www.w3.org/TR/ws-arch/
http://en.wikipedia.org/wiki/Web_service
http://www.webopedia.com/TERM/W/Web_Services.html
http://www.w3schools.com/webservices/ws_intro.asp
http://en.wikipedia.org/wiki/XML
http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol
http://www.collegelib.com/t-service-oriented-architecture-soa.html