Getting connected to TeamSite

Posted: 4 May 2009 in CSSDK, Java, Security, Teamsite, Users

Getting a connection to the TeamSite server is not a complicated story. The process has 2 steps. First, we get a Factory object which is responsible for returning a client given a transport layer. CSLocalFactory works with JNI and CSSOAPFactory works with SOAP.


By default, connection properties are defined in a configuration file and you can find one directly in the cssdk subdirectory of the TeamSite installation directory, named cssdk.cfg. We’ll use that file to create a factory of the right type.

String configFilePath = "/apps/interwoven/teamsite/cssdk/cssdk.cfg";
Properties localProperties = new Properties();
localProperties.setProperty("cssdk.cfg.path", configFilePath);
CSLocalFactory csLocalFactory = (CSLocalFactory) CSLocalFactory.getFactory(localProperties);


Once the factory has been created, we can use it to create a client for us. The client must be authenticated so here we really have 2 choices: we can either give the factory a username and password, or we can tell it to find out who we are from the operating system and log us in directly.

CSClient client = csLocalFactory.getClientForCurrentUser(Locale.ENGLISH, "MyAppName", "localhost");
  1. Cris says:

    Just want to update this:
    i think CSLocalFactory is deprecated in cssdk 3.1.1 and replaced by CSJavaFactory

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s