Hello all,
I have the following method that retrieves a listing of all rooms on the server.
…
…
XMPPConnection connx = (XMPPConnection) conn;
Collection rooms = MultiUserChat.getHostedRooms(connx,CONFERENCE_SERVICE_NAME);
Iterator it = rooms.iterator();
if(rooms.size() > 0)
{
while(it.hasNext())
{
HostedRoom roomName = (HostedRoom) it.next();
MultiUserChat muc = new MultiUserChat(connx,roomName.getName());
Collection collection = muc.getOwners(); //error thrown here.
/code
When a room is created, does the creator of the room automatically become the owner or do I need to specify an owner during room creation using the Form object?
Is there an easier way to get the owner(s) from the HostedRoom object without having to instantiate a MultiUserChat object?
TIA!
Message was edited by: gforty
OK, I recently upgraded to wildfire 3.1.1 from 2.7.x…
The following method is also giving me the No response from server.: error
public void getRoomParms()throws XMPPException
{
XMPPConnection conn = new XMPPConnection(“ispa0012”,5222);
conn.login(“gforty”,“password”);
System.out.println(“LOGGED IN”+conn.getUser());
MultiUserChat muc = new MultiUserChat(conn, “aroom”+CONFERENCE_SERVICE_NAME);
System.out.println(“MUC NAME=”*muc.getRoom());//*THIS WORKS+
Form form = muc.getConfigurationForm(); //THIS IS WHERE IT ERRORS OUT
System.out.println(form.toString());
for (Iterator fields = form.getFields(); fields.hasNext()
{
FormField field = (FormField) fields.next();
System.out.println("FIELD=“field.getVariable()” and its value equals "+field.getType());
Iterator it = field.getValues();
while(it.hasNext())
{
System.out.println(“VALUE=”+it.next());
}
}
}
/code
The error is as follows:
No response from server.:
org.jivesoftware.smackx.muc.MultiUserChat.getConfigurationForm(MultiUserCha t.java:523)
chatPackage.MUC.getRoomParms(MUC.java:298)
org.apache.jsp.try2_jsp._jspService(try2_jsp.java:54)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java: 322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilte r.java:362)
This is the same error I am getting from the getOwners() method call.
I am using smack 2.2.1 dated June 12 , 2006…
Message was edited by: gforty
Has anybody been successful at retrieving the RoomOwner?
Message was edited by: gforty