CaseMap Server

Tutorial: What's the version, CaseMap?

Tutorial: What's the version, CaseMap?

Previous topic Next topic No directory for this topic Expand/collapse all hidden text  

Tutorial: What's the version, CaseMap?

Previous topic Next topic Topic directory requires JavaScript JavaScript is required for expanding text JavaScript is required for the print function Mail us feedback on this topic!  

CaseMap Server currently expsoses the CMServerAD service. This service exposes CaseMap Server version, case, fact, and issue information using a series of REST-based resources. You can query the service using either your browser, or programmatically. The following tutorials show how to retrieve the CaseMap Server version numbers using both paths.

 

hmtoggle_plus1To retrieve the version number of CaseMap Server using a browser

Paste the following URL into your browser address window, replacing "localhost" with the location of your CaseMap server, and press Enter.

http://localhost/CaseMapAD/CMServerAD.svc/version/

hmtoggle_plus1To retrieve the version number of CaseMap Server programmatically
1.In Visual Studio, add the following using statements to your code:

   using System.IO;

   using System.Net;

   using System.Web;

   using System.Xml;

   using System.Xml.XPath;

2.Create the end point that describes the version resource.

   string serverResource = "http://localhost";

   string resourceName = "/CaseMapAD/CMServerAD.svc/version";

   string endPoint = serverResource + resourceName;

If necessary, replace "localhost" with the URL of your CaseMap Server installation.

Note that this code samples uses the Active Directory authentication (CaseMapAD). You could optionally use local authentication, by calling /CaseMapLA/CMServerLA.svc instead. Both services provide the same data: the difference is simply which authentication protocol is used. For more information, see About authentication.

3.Create the call to the server.

  HttpWebRequest request = WebRequest.Create(endPoint) as HttpWebRequest;

  request.Method = "GET";

4.send the response and display the returned content.

      HttpWebResponse response = request.GetResponse() as HttpWebResponse;

   DisplayMessage(response);

   Console.ReadLine();

DisplayMessage is a helper function you can use to display REST mesponses to the console. For more information, see CaseMap Server Helper Methods.

5.Close down the connection.

   response.Close();