[ejabberd] Module to POST stanzas to a ReSTful webservice

Sylvain Niles sylvain.niles at gmail.com
Mon Feb 1 20:55:04 MSK 2010


I'd also suggest using a specific JID for the rest requests so the
module can be used in an ejabberd installation where you need normal
functionality. You'd have to have the module request presence
subscriptions for users though so directed presence stanzas would go
to the rest endpoint.

On Mon, Feb 1, 2010 at 5:55 AM, Adam Hayward <adam at happy.cat> wrote:
> Hi Theo and Mickaël,
>
> thanks, you're welcome! It's a bit rough at the moment, but seems to work. I
> should give credit to Anders Conbere's, because I started out by modifying
> his echo_bot[1] example. Suggestions / patches gratefully received. Some
> things I'd like to improve are:
>
> put configuration options in ejabberd.conf
> allow forwarding of different stanza- or user-types to different web
> services (eg, presence.example.com, iq.example.com etc)
> handling of different HTTP return codes, and network timeouts
>
> All the best,
>
> Adam Hayward
>
> [1]
> http://anders.conbere.org/blog/2008/08/06/building_ejabberd_modules_-_part_4_-_xmpp_bots/
>
> On 1 February 2010 14:45, Theo Cushion <theo at jivatechnology.com> wrote:
>>
>> Hi Adam,
>> I've not had a look at the code - but it sounds great to me. We have a bot
>> that does something similar and I want to simplify this and use a gateway to
>> allow my web app to contain all of the business logic - and let ejabberd
>> worry about the message routing. Your module sounds like it could achieve
>> this very nicely.
>> Cheers
>> Theo
>> On 1 Feb 2010, at 13:39, Adam Hayward wrote:
>>
>> Hello,
>>
>> I have been mucking about a bit with ejabberd, and I made a little module
>> that POSTs stanzas to a ReSTful web interface, and sends the HTTP response
>> back to the sender. I'm not sure how useful this is, but I thought that
>> perhaps someone here might be interested.
>>
>> Info:
>> http://happy.cat/blog/XMPP-Bots-ejabberd-mod-motion-2010-02-01-10-00.html
>> Code:
>> http://svn.happy.cat/public/mod_motion/trunk/
>>
>> Regards,
>>
>> Adam Hayward
>>
>> _______________________________________________
>> ejabberd mailing list
>> ejabberd at jabber.ru
>> http://lists.jabber.ru/mailman/listinfo/ejabberd
>>
>>
>> _______________________________________________
>> ejabberd mailing list
>> ejabberd at jabber.ru
>> http://lists.jabber.ru/mailman/listinfo/ejabberd
>>
>
>
> _______________________________________________
> ejabberd mailing list
> ejabberd at jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd
>
>


More information about the ejabberd mailing list