Example how to send IQ commands to external XMPP server using XEP-0244: IO Data

April 19 - 2009

As was originally asked on WS-XMPP@xmpp.org mailing list on thread "[WS-XMPP] Example webservices created using XMPP", I created a simple example how to create a WebService that is sending IQ stanzas containing IO-Data commands and display the results when received.

In the example we can calculate a mass of atoms. The actual calculation is done by service at ws1.bmc.uu.se. To know more about the "Mass Calculation" -service, I recommend you to contact the author of the original mail Egon Willighagen. The "calculator" seems very interesting, but sadly I have no knowledge about it.

SO FINALLY to the business! Check the example here. To have a proper output, you can test for example using atoms CCC (three carbon atoms) as input. At the bottom of the example web page, should be also visible all the of communication that is send and received between your Web Browser and the XMPP -server.

If you are interested how the web browser of the user is communicating with ws1.bmc.uu.se, read more here.

Note! I have tested the example only using FireFox 3.1b3. One of my friends told me that at least for some versions of IE it does not work as expected.

List of all post on LobsterMonster.org