Sending Java Objects

Hello,

I’m trying to use smack to send a java object. I’ve looked at the documentation here: http://www.igniterealtime.org/builds/smack/docs/latest/documentation/properties. html but it doesn’t seem to specify where to edit this xml or which java methods modify it. Any help would be appreciated.

Thanks,

Mike

Smack isnt designed to send java objects via xmpp- you would need to marshal your object in such a way that it can be represented in an xmpp packet (XML, base64, something), then you need something on the other end that can unmarshal it in the same way.

This code allows me to receieve the java-object as a message property:

SomeObject obj = (SomeObject)message.getProperty(“ObjectNameFromSender”);

I then have ‘obj’ on my end of the chat and am free to do as I wish with it. Sending java-objects simply involves setting a property in the Message object. Check out the link in my first post.