The following topic describes how to interact with TrackStudio from a Java application using TrackStudio SOAP API.
To develop a client application which uses TrackStudio SOAP API:
DevPack dp = new DevPack("http://localhost:8888/TrackStudio");
String sessionId = dp.getUserService().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 simplest Java client:
import gran.trackstudio.DevPack; public class ATest { public static void main(String[] args) throws Exception { DevPack dp = new DevPack("http://localhost:8888/TrackStudio"); String sessionId = dp.getUserService() .authenticate("root","root"); System.out.println("Session ID is:"+sessionId); } }
javac -classpath tssoapclient.jar;axis.jar;jaxrpc.jar Test.java
C:\>java -classpath tssoapclient.jar;axis.jar;jaxrpc.jar; commons-logging.jar;commons-discovery.jar;saaj.jar;. Test Session ID is:297e234cfbf9889500fbf989ee890012