PubSub: a simple service

Hello folks,

I’m quite new to openfire and XMPP, and i’m trying to implement a service to notify the gps coordinates sent by mobile devices.

I worked on this approach:

When a user (say: ) come online it create a “node” (i.e. and begin publishing notifications to that.

When another user want to know about the coordinates it subscibe the node

I would, first of all to be clarified, all about the openfire server settings.

I set the following properties:

xmpp.pubsub.create.anyone true

xmpp.pubsub.enabled true

xmpp.pubsub.root.nodeID ireachyouservice

xmpp.pubsub.service pubsub

The first one is becouse I would like to make possible for a user from another domain/server to create node. (I’d like to offer this service to gtalk user for example). I read that there are problems about that, but i’d like to circumvent those by creating the node through a plugin.

I send this packet to create a node:

 <pubsub xmlns="[](">

      <create node="">

My questions:

  1. This message was replied good, but why i have to put to=“” instead of ??

  2. I put:

System.out.println(" -> Root: " + service.getRootCollectionNode().getNodeID() );

System.out.println(" -> Existing nodes at service: " + service.getServiceID() );

Collection nodes2 = service.getNodes();

Iterator itr2 = nodes2.iterator();

while ( itr2.hasNext() )


Node node2 = (Node);

System.out.println(" -> " + node2.getNodeID() );


in the createNode method in the PubSubEngine Class, and the result is:

-> Root:

-> Existing nodes at service:



while i expect Root is, and why it appears as I have created a service and 2 node?

The final result is that each user sees (when he tries to subscribbe!) only the nodes in “his” service, and doesnt see other nodes!

I hope someone can help me.