Step 1:

To get the list of all the ‘public & private communities’ information service document from IBM Connections, by this URL

<?xml version=”1.0″ encoding=”UTF-8″?>
<feed xmlns=”” xmlns:app=””
xmlns:opensearch=”” xmlns:snx=””>
<title type=”text”>Public Communities</title>
<generator uri=”” version=”″>IBM
Connections – Communities</generator>
rel=”” type=”application/atomsvc+xml”></link>
rel=”” type=”application/atomcat+xml”></link>
<title type=”text”>Getting Started with IBM Connections</title>
<summary type=”text”></summary>
<content type=”html”></content>
<name>Anjaneyulu Telugu</name>

Step 2:

Parse the service document using DOM or SAX parsing and get the list of communities information (CommunityID, CommunityName etc.,

Step 3:

Construct the cookie as shown below

Cookie[] cookies = request.getCookies();
StringBuffer buffer = new StringBuffer();
if (cookies != null) {
for (int i = 0; i < cookies.length; i++) {
Cookie cookie = cookies[i];
String cookieName = cookie.getName();
String cookieValue = cookie.getValue();
if ((cookies.length – 1) == i) {
buffer.append(cookieName + “=” + cookieValue);
} else {

buffer.append(cookieName + “=” + cookieValue + “; “);
String cookieStr = buffer.toString();

Step 4:

This variable cookieStr contains info about LTPA tokens and sessionID

Step 5:

To get updates from a specific community, we need to construct the URL with the communityID of that community as shown below.

forum = “”;

bookmarks = “”;

feeds = “”;

activities = “”;

blog = “”;

Step 6:
Set the cookie on request header of each URL and get the service documents.

abdera = new Abdera();
url = new URL(forum);
conn = url.openConnection();
conn.setRequestProperty(“Cookie”, cookie);

Step 7:

All the service documents are merged using Xquery. A single xml is generated by sorting in the ascending order of published date. Saxon is used as an Xquery processor. A sample is shown below


let $merged := for $url in (collection(“../xml?select=*.xml”))
let $feeddoc := $url
return if (count($feeddoc/atom:feed/atom:entry) > 0)

return for $item in $merged
order by $item/pubdate descending
return local:rss-row($item)



Step 8:

The code given below runs the Shell script on the command line to get the merged xml.

pb = new ProcessBuilder(“/opt/IBM/LotusConnections/data/shared/customization/common/web/project/scripts/”);
Process p = pb.start();

Shell script code as shown below


/opt/IBM/WebSphere/AppServer/java/bin/java -cp  /opt/IBM/LotusConnections/data/shared/customization/common/web/project/scripts/saxon9.jar net.sf.saxon.Query  /opt/IBM/LotusConnections/data/shared/customization/common/web/project/scripts/FileDir.xql >> /opt/IBM/LotusConnections/data/shared/customization/common/web/project/output/rss.xml

The above steps help you to get the data from IBM Connections’ Communities.

Maarga is a boutique consultancy with deep expertise in Lotus Notes migration, digital transformation and enterprise collaboration. Reach out to Maarga with your needs at