Toggle menu
862
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

DCS Web Service: Difference between revisions

From Catglobe Wiki
New page: ==Introduction== The original reason for creating DCS web service was to retrieve data answered in a questionnaire and display them on a Portal element. ==How to use == CatGlobe.Web.DataMo...
 
No edit summary
Line 28: Line 28:
</system.web.extensions>
</system.web.extensions>
</source>
</source>
==Examples==
[[Display a questionnaire's answers in real time]]

Revision as of 06:08, 5 January 2009

Introduction

The original reason for creating DCS web service was to retrieve data answered in a questionnaire and display them on a Portal element.

How to use

CatGlobe.Web.DataModule.DataCache.WebService.DCSWebService.GetDCSData(condition, onSuccessFunction, onFailFunction, element_context);

The condition xml should follow the format of:

<criteria dcs-id="1" top-N="1000" order-by-column="StartDate" order-type="desc">
<column name="StartDate"></column>
<column name="Q25"></column>
<column name="BankName"></column>
</criteria>

Limitation

There is a limit of data retrieval defined by JavaScriptSerializer.maxJsonLength, which is 4 MB Unicode characters as default. If the data retrieval is higher than this, an error will be returned in the onFailFunction: "Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property"

This can be fixed by updating the web config file:

<system.web.extensions>    
<scripting>      
<webServices>        
<jsonSerialization maxJsonLength="500000">        
</jsonSerialization>      
</webServices>    
</scripting>
</system.web.extensions>

Examples

Display a questionnaire's answers in real time