I’m getting an error forbidden on this call. I’m not sure why, since the access model is open, but I’d guessit’s because a different user is trying to clear the node than the creator of the node. The server in use is openfire.
The output of smack debug is below.
11-01 13:23:46.615: D/SMACK(2213): 01:23:46 PM SENT (-1278593608):
You can add as many node owners as you like. In fact, a coworker of mine created a plugin (for Openfire) that would automatically make a user a node owner when they tried to delete a node so it would always work, which worked great for our particular use case.
Unfortunately, I don’t have the plugin code to give you, but it was pretty trivial, you just have to write a plugin that also implements PacketInterceptor. Check the incoming packets for a the purge request and then add the requestor as a node owner via node.addOwner(bareJid), if they aren’t already.
Smack does not have support for the affiliation management part of the spec. You can fairly easily write the packets manually and send them, but this still cannot be done unless you have the appropriate priviliges, which typically means a node owner or admin. To effectively bypass this authorization, I am pretty sure you will have to do that from the server side.