Passing XMPP to HTTP then back again

I’ve recently been working on a project to allow a client to contact traditional http only web services through multiple channels including http, sms, and xmpp.

In the XMPP case, the user would send a request to an account on an openfire server that I manage, that server would pull information from the message and POST it to an http app server I manage. The http server pulls information from one or more services based on the request from the XMPP server and contructs a reply.

I then send this constructed reply back to XMPP server (using XMPPHP).

I am still new and learning to XMPP and openfire, so for my first stab at implementing what I described above, I’ve written a plugin that implements Component and if it recieves a message for the domain it is listening to it simply queries values from the message stanza (id, to, from, message, …) and posts them to an http server.

This plugin code works (sort of). Them probem is, since it is a component, I have to send the message to (rather than which can be awkward for end users.

Second, the xmpp reply from the http server appears on a seperate chat window/tab since the initial client request was to a component and the reply comes back from a real user.

What I idealy need is an account on my openfire server I can send messages to (say, have that message intercepted on the openfire server and posted to an http server. Then be able to send a reply back to the initial requesting user (as in the same message thread).

One thing to note is that the openfire server I manage with have only these ‘service bots’ as accounts, there are no ‘real’ users on this particular server.

looking for advice on how to implement the XMPP portion of this via a Plugin or something else?

thanks in advance for any help.


  1. You do know that Openfire does already support HTTP-Binding?

  2. Check out Botz Library to create bots as

Hi Sam Keen,

Coolcat wrote:

  1. Check out Botz Library to create bots as

if I remember right there was something broken in the Botz Libraries with OF 3.6.0 when I used it couple of moths ago. I’ll be easy to fix though. Beside of that the lib works nicely. If you need any help using it, just let me know.



thanks to coolcat and koski for pointing out botz. I installed the parrot bot example and it works in the way I need so I should be able to adapt my plugin to use botz.