Class Qww.Service
JavaScript class to communicate with the QWWService.ashx handler on the server. The
QWWSerrvice is a http handler implemented in the QlikWeb WorkBench dll.. This handler can
implement various services, for example providing server sidee session based data storage
(which can for example be used to store baskets) and RSS data.
Defined in: <JavaScript\QWW\QwwJs_Service.js>.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Qww.Service(url)
Constructs a new Qww.Service instance.
|
| Method Attributes | Method Name and Description |
|---|---|
|
GetResponse(data, onCompleteHandler)
Method to call to send a request to the service.
|
Class Detail
Qww.Service(url)
Constructs a new Qww.Service instance.
var xmlStore = "<service provider=\"storage\" method=\"set\"><payload><key>
MY_KEY</key><value>MY VALUE</value></payload></service>";
var storageService = new Qww.Service();
storageService.GetResponse(xmlStore, function(resp, status){alert(status);}});;
var xmlRetrieve = "<service provider=\"storage\" method=\"get\"><payload><key>
MY_KEY</key></payload></service>";
// run syynchronously this time, val should be "MY VALUE"
var val = storageService.GetResponse(xmlRetrieve);
- Parameters:
- {String} url Optional, Default: "QWWService.ashx"
- URL of backend http handler. This is configured in the web.connfig file for the application and is normally set to QWWService.ashx.
Method Detail
GetResponse(data, onCompleteHandler)
Method to call to send a request to the service.
- Parameters:
- {String} data
- XML data to send to the service.
- {Function} onCompleteHandler Optional
- Function to run when service returns with result. Function should accept (response, status) arguments. NOTE if this argument is not supplied the reqeust will run synchronously and return the response.
