* @param forWaveJID if true, it's for the remote Wave JID, else it's the
* remote pubsub JID.
* @return the new IQ packet.
*/
private IQ createDiscoInfo(boolean forWaveJID) {
IQ response = new IQ(IQ.Type.result);
response.setTo(LOCAL_JID);
response.setID(DISCO_INFO_ID);
Element query = response.setChildElement("query", XmppNamespace.NAMESPACE_DISCO_INFO);
if (forWaveJID) {
response.setFrom(REMOTE_JID);
query.addElement("identity")
.addAttribute("category", XmppDisco.DISCO_INFO_CATEGORY)
.addAttribute("type", XmppDisco.DISCO_INFO_TYPE)
.addAttribute("name", SERVER_DESCRIPTION);
query.addElement("feature")
.addAttribute("var", XmppNamespace.NAMESPACE_WAVE_SERVER);
} else {
response.setFrom(REMOTE_PUBSUB_JID);
query.addElement("identity")
.addAttribute("category", "pubsub")
.addAttribute("type", "whatever")
.addAttribute("name", "not a wave server");
query.addElement("feature")