Chapter 2. Tutorial

Table of Contents

Test Install
Compile it yourself
Database Security and deployment scenarios
Examples of use
Test Google Connection
Send a google message
Send a google message to a list of recipients
Get Google Rosters (ie. contacts) in xmltype
Get Google Rosters : get contact list in table format
Test XMPP Connection
Get XMPP Rosters in xml format
Send XMPP Message
Get XMPP Rosters in table format
Interact with Openfire
Test connection
Send a Messge
Get Rosters


The install steps is divided in many steps, please respect the order if you are not familiar with these manipulations. If you are already experimented and think the install process can be improved, contact me.


Please note that this libray can only be used on Oracle 11g as i could not compile with Smack API 3.0.4 libraries on 1.4 JDK version.

To install, just look at the following script and follow instructions. All jars are in /OracleXMPP/dist/ and dist/lib/ directories.

In the script, all XMPP features belong to XMPP schema, so the only thing you have to do to use XMPP from an another schema is to grant execute privileges to your target schema. In my install script, it's already done so SCOTT can send XMPP messages from it's own session like that :

SQL> sho user
SQL> select dbms_xmpp.send_plain_text_message('',
  2     5222,
  3     '',
  4     'Scott.Tiger',-- The GTalk login
  5     'XXXXXXXXX', -- The GTalk password
  6     '', -- The recipient
  7     'XMPP Test from scott',
  8     'Hello from scott on his 11g') xmpp_return_code
  9  from dual;