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 user@sub.domain.com (rather than user@domain.com) 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 service@example.com), 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 service@example.com 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.
sam