flag_en.png English version - flag_fr.png Version française

Configuration of server methods

Everything's configured into one file: dynAjaxConfig.xml

Config file full example

<?xml version="1.0" encoding="utf-8"?>
<!-- DynAjax configuration file -->
<dynAjaxParams xmlns="http://www.dynajax.org/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- General configuration: authentication -->
<authenticationMethod assemblyName="[APP_CODE]" className="SessionManager" methodName="checkAuthentication"/>
<!-- Classes and Methods definition -->
<class id="SessionManager" assemblyName="[APP_CODE]" className="SessionManager">
<method name="loginUser" needAuth="false">
<param name="login" type="string"/>
<param name="password" type="string"/>
<method name="logoutCurrentUser" needAuth="true"/>
<method name="checkAuthentication" needAuth="false"/>
<method name="getCurrentUserLogin" needAuth="true"/>

How to expose a server method ?

just set a method Xml node inside a class node:
<class id="MyClassId" assemblyName="[APP_CODE]" className="MyServerClass">
<method name="myServerMethod"/>
That's it, your server method is now exposed in your JavaScript on client side.
to call your method on client side, just write MyClassId.myServerMethod();.

Last edited Oct 28, 2008 at 2:36 PM by magicben, version 6


No comments yet.