Once you have the API on your classpath, first create a RAMSession object. This session will be the primary interface to the Rational Asset Manager server. To do this you can use the public constructor passing in the web services Repository location URL found in the Web Services section on the page of your Rational Asset Manager web client along with a login id and password.
For example:
// Create a connection to Rational Asset Manager
RAMSession session = new RAMSession(
"http://ramsrvr.test.com:8080/ram.ws",
"mylogin", "mypassword");
RAMSession session = new RAMSession("http://servert:8080/ram", "user", "pass");
Alternatively, if you run as an Eclipse plug-in you can create a session object from a repository connection created with the Eclipse client tool. To do this you need to call RichClientCorePlugin.createClientSession(RepositoryIdentification, boolean)
// Create a connection to Rational Asset Manager
final String URL = "http://ramsrvr.test.com:8080/ram.ws";
final String USERID = "mylogin";
RepositoryIdentification id = new RepositoryIdentification(null, URL, USERID);
RAMSession session = RichClientCorePlugin.getDefault().createClientSession(id);
String ramURL = "http://localhost:8080/ram.ws"; String ramUserID = "admin"; String ramPassword = "admin"; String queryParam = null;
RAMSession session = new RAMSession(ramURL, ramUserID, ramPassword);
RAMSession session = new RAMSession(ramURL, ramAdminUserID, ramAdminpassword, onBehalfOfUserId)For more information, see the RAMSession class.