Guide to use XML-RPC with Continuum


In this section, you'll learn how to connect to a Continuum instance and how to do some action on projects.


To connect to a Continuum instance, you must use the continuum-xmlrpc-client jar.

This library have some others jars as dependencies, so the best way to start the development of a Continuum xmlrpc client is to create a maven2 project with the following dependencies:


Connection to Continuum

To connect to your Continuum with the client API, you must use the ContinuumXmlRpcClient class.

The constructor use 3 parameters:

  • url, the url of the xmlrpc listener that is http://host:port/continuum/xmlrpc
  • user, a Continuum user
  • password, the user's password
    String url = "http://localhost:8080/continuum/xmlrpc";
    ContinuumXmlRpcClient client = new ContinuumXmlRpcClient( url, username, password );

Getting project groups list

You have two ways to get the project groups list. The first is to get only a summary of groups and the second returns groups with details. If you don't need all informations, we recommend to use the first way, so you'll save time to get datas and memory on the server.

List<ProjectGroupSummary> pgs = client.getAllProjectGroups();
List<ProjectGroup> pgs = client.getAllProjectGroupsWithProjects();

Getting projects in a group

List<ProjectSummary> ps = client.getProjects( projectGroupId );

If you already have a ProjectGroup or ProjectGroupSummary object, you can access to the project group id with this:

int projectGroupId = pg.getId();

Building all projects in a group

  • With the default build definition
    client.buildGroup( projectGroupId );
  • With a build definition
    client.buildGroup( projectGroupId, buildDefinitionId );

Building a project

  • With the default build definition
    client.buildProject( project.getId() );
  • With a build definition
    client.buildProject( project.getId(), buildDefinitionId );

    Note: When you start a build, the project is put in the Continuum queue and will be built when all projects added previously in the queue will be built.

Triggering a build

In some case, users want to use the push build technique with a hook in their SCM, so when a developer will commit some files, a build will be triggered. To do this, you can write a simple xmlrpc client that will use a project id as parameter and you'll use the buildProject(...) method described above.

This method will start a forced build.


With the Continuum xmlrpc client, you can backup a full Continuum instance (without users database, for the moment).