Hello,
I try to add a file using the OpenKM C# Rest API 2.1.
I just set up a project in VS2013, found out that I had to add RestSharp (v105.2.3.0 by NuGet) and now get a "Missing method" exception on calling createDocument():
Are there any tutorials or examples on the API?
Is there documentation of the methods and there usage?
My code is:
Snowman
I try to add a file using the OpenKM C# Rest API 2.1.
I just set up a project in VS2013, found out that I had to add RestSharp (v105.2.3.0 by NuGet) and now get a "Missing method" exception on calling createDocument():
Code: Select all
Is this library actively maintained?An unhandled exception of type 'System.MissingMethodException' occurred in OKMRest.dll
Additional information: Method not found: "RestSharp.IRestRequest RestSharp.IRestRequest.AddFile(System.String, Byte[], System.String)".
Are there any tutorials or examples on the API?
Is there documentation of the methods and there usage?
My code is:
Code: Select all
Best regards,class Program
{
static void Main(string[] args)
{
String host = "http://10.10.7.11:8080/OpenKM";
String user = "okmAdmin";
String password = "admin";
var okm=OKMWebservicesFactory.newInstance(host, user, password);
using (var fileStream = new FileStream(@"testmail.eml", FileMode.Open, FileAccess.Read))
{
okm.createDocument("/test/testmail.eml", fileStream);
}
}
}
Snowman