Difference between revisions of "DCS Web Service"

From Catglobe Wiki
Jump to: navigation, search
(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...)
 
Line 28: Line 28:
 
</system.web.extensions>
 
</system.web.extensions>
 
</source>
 
</source>
 +
 +
==Examples==
 +
[[Display a questionnaire's answers in real time]]

Revision as of 07: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:

1 <criteria dcs-id="1" top-N="1000" order-by-column="StartDate" order-type="desc">
2 <column name="StartDate"></column>
3 <column name="Q25"></column>
4 <column name="BankName"></column>
5 </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