Wednesday, December 12, 2012

REST Service Client Tool : Beginner's Way

REST means Representational state transfer one of the mechanism of writing web service . After writing web service we need to write a client for it for testing purpose .But by using simple tool we can save our time of writing a client to test our server side service even it is 10 min. There is a chrome browser named Simple REST Client which we can use to serve our purpose.
We can download it from :Chrome Extension (Simple REST Client). We will find an icon in our chrome as indicated in picture after installing it in our chrome browser.



If we click the icon previously mentioned we will get a UI (user interface) like :


Instruction to use it :
URL : put your service url hear , example : https://www.example.com/restService/payment
Method : depends on your endpoint . in case of us POST
Header : Content-Type: text/html;charset=utf-8 or Content-Type: text/xml;charset=utf-8 this define the request message type expected by service end.In case of us (Content-Type: text/html;charset=utf-8).
Data : If you put service url in URL then this Data section will appear.In this section we will put actual client request message such as :


  CC
  John
  Doe
  1234 Street
  WA
  123
  US
  v
  4100111111111111
  0115
  123
  usd
 
     
  123
  Fall 2013
  123
  BBA
 
 
  example description
           12/12/2012
 
 
 
      
  TYPE
  tuition
  2
  2
  1

 
 
  TYPE
  Late Fee
  1
  2
  1
 


Previous request message (xml) taken from a real world scenario so i changed the real information to dummy information.

Now , we just need to hit send button , it will send the request to service end and show us response as desired by client. Response example : :

1
1
This transaction has been approved.
9DJEXW
Y
2180716417
4.00
CC
billing first name
billing last name
dhaka dhaka 1229 bangladesh 2 XXXX1111 Visa

This extension will work as a REST client . That's all. Apart from it we can use SOAP UI but this is much more easier for beginner and later on SOPA UI can be used . Wish to write on SOAP UI how to later.

No comments:

Post a Comment