Difference between revisions of "Csharp webservice dll"
From OpenKM Documentation
Line 7: | Line 7: | ||
* Webservices for OpenKM Professional 6.2 | * Webservices for OpenKM Professional 6.2 | ||
* Webservices for OpenKM Community 6.0+ | * Webservices for OpenKM Community 6.0+ | ||
+ | |||
+ | == Understanding the basics == | ||
+ | For all webservices methods are available two methods one with token and other without it. For example to get granted roles of some node path can be used: | ||
+ | <source lang="csharp"> | ||
+ | Dictionary<String, int> getGrantedRoles(String nodePath); | ||
+ | Dictionary<String, int> getGrantedRoles(String token, String nodePath); | ||
+ | </source> | ||
+ | |||
+ | First case getGrantedRoles(nodePath) internally controls login and logout actions and is not needed a token, on second is necessary give a token, than means you take control of login and logout actions in your source code. | ||
== Example of use == | == Example of use == |
Revision as of 12:06, 23 September 2013
Dll have been compiled for net 2.0 that should ensure go with any upper .net version |
Download File:OKMWebservice.zip
Available api:
- Webservices for OpenKM Professional 6.4
- Webservices for OpenKM Professional 6.2
- Webservices for OpenKM Community 6.0+
Understanding the basics
For all webservices methods are available two methods one with token and other without it. For example to get granted roles of some node path can be used:
Dictionary<String, int> getGrantedRoles(String nodePath);
Dictionary<String, int> getGrantedRoles(String token, String nodePath);
First case getGrantedRoles(nodePath) internally controls login and logout actions and is not needed a token, on second is necessary give a token, than means you take control of login and logout actions in your source code.
Example of use
String host = "http://localhost:8080";
String user = "okmAdmin";
String password = "admin";
int serverVersion = OKMWebServiceFactory.PROFESSIONAL_6_4;
OKMWebservice okmWebservice = null;
if (serverVersion == OKMWebServiceFactory.PROFESSIONAL_6_4)
{
okmWebservice = OKMWebServiceFactory.getInstance(host, user, password, OKMWebServiceFactory.PROFESSIONAL_6_4);
}
else
{
okmWebservice = OKMWebServiceFactory.getInstance(host, user, password, OKMWebServiceFactory.PROFESSIONAL_6_2);
}