TrackStudio Enterprise 3.5

The following topic describes how to realize the interaction between TrackStudio and a .NET application using TrackStudio SOAP API.

To develop the client application that uses TrackStudio SOAP API you must:

  1. Enable TrackStudio SOAP API
  2. Start TrackStudio Enterprise
  3. Create XML Web service proxy classes.

Create a proxy class for each service. Every proxy class must be a separate namespace. To generate a proxy to access the User service execute the following command:

wsdl.exe http://localhost:8888/TrackStudio/services/User?wsdl
/out:dll/UserService.cs /namespace:User

As a result, the UserService.cs proxy class will be created in the dll folder. Repeat these steps for other services and link all the created proxy classes to the ts.dll library:

csc.exe /t:library /out:ts.dll dll\*.cs
  1. Implement client application. In order to work with SOAP API you should first perform authentication. To do this:
  • Create proxy class instance
UserService uSrv = new UserService();
  • Set TrackStudio SOAP Service URL
tSrv.Url = "http://localhost:8888/TrackStudio/services/User";
  • Call the authenticate method
string sessionId = uSrv.authenticate("root", "root");

The session id received as the result of authentication can be used to call other methods. 

The code presented below shows the example of the simple .NET client application:

using System;
using User;
public class SoapTest {
    public static void Main(string[] args) {
        UserService uSrv = new UserService();
        uSrv.Url = "http://localhost:8888/TrackStudio/services/User";
        string sessionId = uSrv.authenticate("root", "root");
        Console.WriteLine("Session ID is: " + sessionId);
  1. Compile the client application
csc.exe /reference:ts.dll SoapTest.cs
  1. Run the client application
Session ID is: 297e234cfbf9889500fbf989ee890012