AnsweredAssumed Answered

Not able to get response from server for custom IQ

Question asked by sumit on Oct 20, 2014

I am working on one project which having group and private user chat i have completed both. Now i am creating one custom IQ like

 

<iq id='getcontentsharing1' to='____@__.com' from='__@___.com/49c96895-3f8f-4b6c-8b81-92f55d200d40' type='get'><query xmlns'http://jabber.org/protocol/muc#admin'><item sharing='____@____.com'/></query></iq>

 

But not able to get the response from server, but same request my co developer who is working on iPhone getting the response. I have added ProviderManager.addIQProvider("query", "http://jabber.org/protocol/muc#admin", new MUCAdminProvider()); but not able to get response.

 

Here is my android implementation:-

 

ProviderManager.addIQProvider("query", "http://jabber.org/protocol/muc#admin", new MUCAdminProvider());

  IQ iqObj = new IQ()

  {

  @Override

  public CharSequence getChildElementXML()

  {

  return "<query xmlns'http://jabber.org/protocol/muc#admin'><item sharing='" + Constant.joinmeetingList.get(0).getConferenceID()

  + "@___.com'/></query>";

  }

  };

 

 

  iqObj.setFrom(connectionXmpp.getUser());

  iqObj.setPacketID("getcontentsharing1");

  iqObj.setTo(Constant.joinmeetingList.get(0).getConferenceID() + "@____.com");

  iqObj.setType(IQ.Type.GET);

  connectionXmpp.addPacketListener(new PacketListener()

  {

  @Override

  public void processPacket(Packet arg0) throws NotConnectedException

  {

  arg0.getPacketID();

  }

  }, new PacketTypeFilter(IQ.class));

 

 

  connectionXmpp.addPacketSendingListener(new PacketListener()

  {

  @Override

  public void processPacket(Packet arg0) throws NotConnectedException

  {

  arg0.getPacketID();

  }

  }, new PacketTypeFilter(IQ.class));

 

 

  connectionXmpp.addPacketInterceptor(new PacketInterceptor()

  {

  @Override

  public void interceptPacket(Packet arg0)

  {

  arg0.getPacketID();

  }

  }, new PacketTypeFilter(IQ.class));

 

 

 

 

  connectionXmpp.sendPacket(iqObj);

 

Please help me guyz.

Outcomes