powered by Jive Software

Help with ad hoc commands


Hope someone can help me with the following:

I try to call the "get-group-members’ ad hoc command from my code (using Smack and OpenFire). Here is my code:

**AdHocCommandManager ahm = AdHocCommandManager.getAddHocCommandsManager(conn1);

**RemoteCommand rc = ahm.getRemoteCommand(myJID, “http://jabber.org/protocol/admin#get-group-members”);


**Form rep = rc.getForm().createAnswerForm();

**rep.setAnswer(“group”, “mygrouptest”);


**rep = rc.getForm(); **

I’m getting back the form, but what I need is (probably!) ReportedData. I found the org.jivesoftware.smackx.DataForm has getReportedData () but it’s not inherited from Form.

How can I get read the results of an AddHocCommand?

Thanks in advance!