Integrate Instant Messenger into Intrexx

There are a lot of different ways to communicate inside companies. In smaller businesses it’s more likely to just talk to each other or send emails. However, if the company grows there is a point where companies need to offer additional ways to exchange information. One of these additional technologies would be instant messaging. There are multiple providers of such applications, most of them are hosted outside of your company. With Intrexx it’s possible to integrate the free real time collaboration server Openfire for XMPP(Jabber) into your company portal using a jQuery XMPP plugin. Openfire can be hosted in your own environment, used for free and is therefor a good alternative for instant messaging.

Openfire is a real time collaboration server which enables you to provide instant messaging inside your company without the need of external services. This server contains its own user- and contact-management. In order to use Openfire, Intrexx users need to be transferred to Openfire somehow. Also there needs to be some interface to access the server over the web.

Install and Activate Rest-API and HTTP-Bind

A lot of plugins are available for Openfire, one in specific is needed to communicate to Openfire from the outside and this is the Rest-API-plugin. This plugin for example enables you to manage users and their contacts. This plugin needs to be installed and activated to be able to manage Openfire users out of Intrexx.

Another feature we need is the http-bind. This feature allows us to keep a connection via http in order to sent and receive instant messages. Since Intrexx doesn’t have a push mechanism yet, the communication needs to be done by a third-party-library which directly communicates with Openfire.

This third-party-library is the jQuery XMPP-plugin I mentioned earlier.

Copy Intrexx users and contacts to Openfire

But first things first. Without users in Openfire we can’t send any messages.

On the Openfire Rest-API documentation page there are several examples on how to use this interface. On the Intrexx side I use Groovy and the Apache Commons HttpComponents project to communicate with this API. In my example I connect using the Openfire Secret for authentication. After this I retrieve a List of all Openfire users having the custom IsIntrexxUser property set to true. I compare this list to a list of Intrexx users that are allowed to use Instant messaging. The users that don’t exist in Openfire are then created using the Rest-API.

Implement jQuery XMPP chat

On the jQuery plugin page, there is an example of a basic chat which I reuse and adapt to what I need in Intrexx. Username and password are already clear, so these elements can be deleted. The contact-list doesn’t need to show the username, but the fullname. The HTML/CSS needs to be adjusted a little bit, but in general this already works.

Test communication between two Intrexx users

To test the functionality of this whole construct you can open two Browser instances to login as two different users, or you can use another Third-party-tool like Pidgin to login to Openfire and chat with the user logged in to Intrexx.

Since April 2014 I'm working in the Consulting Services department at United Planet in Freiburg, Germany. My tasks there include holding Intrexx seminars, develop and customize customer-applications and in general find solutions for all kinds of problems using Intrexx. Also I forward bugs and feature-requests to our development department in order to further develop Intrexx.
Additionally to that I'm very active in United Planet's community forum and answer a lot of questions asked by customers or partners of United Planet.