Introduction to Web Services

Hola Testors!

I think to start my first blog post with web services testing which I’m currently doing 😉

So first we need to understand what is a web service. Ya In today most of developers are using this web services or APIs to build web applications. For mobile they use mobile SDKs. It is actually like a library which we can use their methods.

Today when you are developing an application you do not need to build it from the scratch. There are lots of ready made services available which you can directly plug in to your application and deal with those values. For example think you need to build an application which use to display currency exchange rate from one currency to another one. You can use a web service to get the exchange value. And some organizations builds their own APIs for the applications. Some organizations allows to public (developers) to use their APIs (eg: google map).

So if you wants to memorize what is web service;

Web Services is the mechanism or the medium of communication through which two applications / machines will exchange the data irrespective of their underline architecture and the technology.

Web service can implement in different ways, but there are two popular ways among other methods. Those are;

  1. SOAP (Simple Object Access Protocol)
  2. REST (REpresentational State Transfer architecture)

 

SOAP

SOAP is the standard protocol defined by W3C standard for sending and receiving web service request and response. SOAP uses the XML format to send and receive the request and hence the data is platform independent data. SOAP messages are exchanged between the provider applications and receiving application within the SOAP envelops. And it uses HTTP protocol.

 

REST

REST  is an architecture that generally runs over HTTP. REST is an alternative to SOAP and instead of using XML for request REST uses simple URL in some cases. Unlike SOAP, RESTFUL applications uses HTTP build in headers to carry meta-information. All API request parameters and method parameters can be sent via either POST or GET variables.

REST API supports both XML and JSON format. It is usually preferred for mobile and web apps as it makes app work faster and smoother. REST returns some HTTP code values to user to understand the nature of response.

HTTP Code Meaning Description
1xx Informational Request received and continuing process
2xx Success Action was success
3xx Redirection Further actions must be taken in order to complete the request
4xx Client Error Request contain bad syntax/ cannot fulfill the request
5xx Server Error Server unable to fulfill the request

 

WSDL

WSDL (Web Services Description Language) is an XML based language which will be used to describe the services offered by a web service. WSDL describes all the operations offered by the particular web service in the XML format. It also defines how the services can be called.

 

Web Service Testing

In order to do a web service testing for a particular web service you need to know 5 things

  • Understanding of the WSDL file
  • Understanding the operation that particular web service do
  • Understanding of the request XML format
  • Understanding of the response XML format
  • Using an appropriate tool for test

For the last point we can use SoapUI which we will discuss about in near future 😉


 

I hope by reading this post you will get some understand about what is web service and why we are using it. In next couple of posts I hope to explain about how to do a web service test with SoapUI with example. Please if you have any comments or suggestions please throw to me. I like to improve it with your suggestions and ideas. See you soon!

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s