HttpServerConnection

rated by 0 users
This post has 1 Reply | 1 Follower

Not Ranked
Posts 1
Points 0
russell.anderson Posted: Wed, Apr 16 2008 2:42 PM

Following the directions in the 8.1.1 Programmers Guide (8.2 not available for download yet) document under section 11.1 and running against IOM.DLL version 8.2.0.5419, results in the compile error "The type 'Aras.IOM.HttpServerConnection' has no constructors defined when I try to instantiate a new HttpServerConnection object as follows:

 HttpServerConnection h = new HttpServerConnection();

 Additionally, the HttpServerConnection object in version 8.2.0.5419 doesn't appear to have the http_username, http_password, etc, properties that are referenced.

Is there an updated document with sample code for connecting to Innovator using the IOM DLL that I should be referencing, or am I missing something else?

 Thanks,

 Russell

  • | Post Points: 0
Top 50 Contributor
Posts 39
Points 85
snnicky replied on Fri, Apr 18 2008 2:58 PM

Hello Russel.

Here is a C# sample for Innovator 8.2:

string innovatorServerUrl = "http://myinnovator/Server/InnovatorServer.aspx";
string database           = "mydatabase";
string userName           = "admin";
string password           = Innovator.ScalcMD5("innovator");

HttpServerConnection httpConnection = IomFactory.CreateHttpServerConnection(
  innovatorServerUrl, database, userName, password);

httpConnection.Login();
try
{
  Innovator innovator = IomFactory.CreateInnovator(httpConnection);
  Item q = innovator.newItem("User", "get");
  q.setAttribute("select", "working_directory");
  q.setProperty("login_name", "admin");
  Item r = q.apply();
  //.....
}
finally
{
   httpConnection.Logout(false);
}
  • Filed under:
  • | Post Points: 0
Page 1 of 1 (2 items) | RSS