July 22, 2013

Tester Friend's: Web Service Testing

What is Web Service?
It’s a communication between two devices. Standard way of integrating the web based application. Provides interaction between all Major Platform.

Ex: One application is developed in "Java" and another application is developed in "Ruby".
If we want to use the services of'Java' application in 'Ruby' as well as in 'PHP' application, then the API Keys were generated and provided to them.
Whenever ruby application send request to Java, then we can use the java application functionality as well as Ruby application Functionality.

Real Time Ex:
Consider Google Maps. If user want the google maps in some other application[like Yahoo]. Google map can be integrated in yahoo and services of google[maps] is used.

How it works in backend?
Basic service platform is XML + HTTP

Basic Elements in Web service Platform: SOAP, WSDL, UDDI

SOAP:
- It’s a Simple Object Access Protocol. Format to provide input messages.
-  It is a Platform Independent
- Heavy Weight.
- Based on the XML.
- Does not provide user with GUI.
- XML that allows application to transfer information over HTTP.

WSDL:
- XML language for locating the Web service.
- WSDL stands for Web Services Description Language.

UDDI:
- UDDI stands for Universal Description, Discovery and Integration.
- Directory for storing information about web services.
- UDDI is a directory of web service interfaces described by WSDL.
- Communicates via SOAP.
- Built into Microsoft .NET platform.



   XML                          SOAP                                                   WSDL                                      UDDI   
Tag data                Transfer data          Describe available services     Listing the available services.



Types of Web Services:
Different people use different types to web services.
As of now, I came to know about two types of web services (Simple Web service and Complex web service)

Below is also the types of web services Which I get from others. Still need to analyse more on this.
Big Web Service (SOAP).
Restful Web Service.
               

> Refer SOAP web service above.

> Restful Web service.
- Representational state transfer.
- Lightweight process
- It is based on the HTTP protocol and its methods.
- Use Existing well known standards [HTTP, XML, URI, MIME].


HTTP methods:
Get -> Requesting the page.
HEAD -> Requesting the  header information about the page (returns on the HTML header information)
POST -> Passing the parameters (data) in the requested URL.
PUT -> uploads the representation of the specified URI.
Delete -> Deleting the data in the page.
Options -> returns the possible actions in the page.
TRACE -> Getting the information in deeper level. Trace provides the back ground process information.

Still lot of HTTP methods are available. Above I have mentioned the major HTTP methods.

Restful services is good, because of Lightweight process.

Please correct me, if I am wrong.

Input format:
URL: HTTP/HTTPS/FTP
Output format: XML/JSON and some more.