/
How to Call RESTful Web Service

How to Call RESTful Web Service

Migrated from http://intranet.wavelet.asia/projects/wavelet-ms/wiki/How_to_call_RESTful_Web_Service

Web Service Structure in EMP has mainly 3 parts:

  • Web Service Access Address
  • Service Name
  • Action Name

URL to access web service: http://empdomain.biz/ws/api/webservicename/actionname

 

Example:

http://cloud.wavelet.biz/demo/ws/api/itemService/get

 

Actions

EMP has following Actions:

 

Action Name: get

get action mainly used to retrieve data from server. It has 3 parameters:

Parameter NameData TypeRequired/OptionalSample DataDescription
userNameStringRequiredchinuserName is being used for Authentication of the user to perform this action
passwordStringRequired123456password is being used for Authentication of the user to perform this action
queryObjectStringRequiredSample json data of queryObject parameterThis is a json data of SQL query

Sample Code to call get action using JAVA Platform

 

Action Name: getCount

getCount action mainly used to retrieve number of records available in server for a particular query. It has 3 parameters:

Parameter NameData TypeRequired/OptionalSample DataDescription
userNameStringRequiredchinuserName is being used for Authentication of the user to perform this action
passwordStringRequired123456password is being used for Authentication of the user to perform this action
queryObjectStringRequiredSample json data of queryObject parameterThis is a json data of SQL query

Sample Code to call getCount action using JAVA Platform

 

Action Name: add

add action mainly used to send records to server to add in particular table. It has 3 parameters:

Parameter NameData TypeRequired/OptionalSample DataDescription
userNameStringRequiredchinuserName is being used for Authentication of the user to perform this action
passwordStringRequired123456password is being used for Authentication of the user to perform this action
txqueueJsonStringRequiredSample json data of txqueueJson parameterThis is a json data with all information required to create a Tx Queue. It can hold data for Sales Order Index, Sales Order Item, Cust Invoice Index, Cust Invoice Item, Receipt Index and Tc Terminal

Sample Code to call ADD action using JAVA Platform

Private & Confidential