Posted by robloach on February 6, 2007 at 6:52am
Out of curiosity as to how the Services modules worked, I started work on a Jabber Service for Drupal. The result is a service that allows you to connect to a Jabber server and send a message. It's just the beginnings, and I'd like to see it progress. If anyone would like to expand on the idea, please do. You'll be able to find all required code here:
http://www.robloach.net/system/files/jabber_service.zip
Feel free to take a look at the code and see if there's anyway we could make Drupal->Jabber integration better. Thanks a lot!

Comments
Yes! Very exited ... this is
Yes! Very exited ... this is exactly what I want to see happening with Services. Let me know if anything needs to be improved on the services.module end to help you out.
Good work,
Scott
This by Them
Persistent Data
Is there a way to keep data persistent between calls among services per user/session?
For example, with the Jabber Service, so far the user is required to provide the server information, port number, username and password everytime they want to use any of the Jabber functions. This is so that the service can connect to the server, do whatever, and then disconnect safely. Is there a way to make it so that they can just call Connect, use any amount of functions, and then Disconnect, without having to provide the server, port, username and password for every service function call?
I was having a quick look at the user_service and was thinking that it might have to do with $user? Can I somehow store the Jabber object data in $user without effecting anything negatively? Do you have any recommendations?
sessions
Services has session handling built in, so you can pass a session id with every method call, if you have session id's enabled. You can get a session ID before making any calls by calling the system.connect method. Or maybe in you own jabber.connect method, you could store the jabber object in the session and return a session ID instead of the jabber object. Or, even an object containing both a session ID and the jabber object, if you need to use the jabber object in your app. If your external app is running inside of a browser though, you can leave the session id setting off, and Drupal will read the browser cookie. In your jabber service, you can store your persistent data either using the PHP session global, or thet $user object, though I'm not really familiar with how you might do it with the user object.
I want to mention that '#auth' hash may not work like you think it does. It does not check that a user is authorized, it just means that if true, or undefined, and session IDs are enabled for services, then the method call must include a session id first before any other arguments.
Scott
This by Them
Project/Idea dead?
What about this Idea/Project?
Another good Jabber-Thingy in Drupal that died?! I'm a little bit unhappy about all the good Jabber-related Ideas that "die" in their first steps...
I'm interested in the Above Sources...
Greetings!