User subscribe

Hello, i have a question: how a user can subscribes to a node? What is the right code? Thanks

Nobody helps me?

Hi,

could you explain what you want to do? Your question is not very detailed.

LG

Hi, I created this code:

public void Publication()

{

PubSub pubSub = new PubSub();

pubSub.setFrom(“feeds@04001-sipit15”);

pubSub.setTo(“pubsub.04001-sipit15”);

pubSub.setType(IQ.Type.SET);

PublishElement publish = new PublishElement(“news”);

pubSub.addChild(publish);

publish.addChild(new ItemElement(null,“http://www.criai.it”));

ItemElement item = (ItemElement)publish.getChild();

PublishElement napoli=new PublishElement(“Napoli”);

pubSub.addChild(napoli);

napoli.addChild(new ItemElement(null,“http://www.ilmeteo.it/portale/taxonomy/term/2/0/feed?citta=Napoli”));

PublishElement roma=new PublishElement(“Roma”);

pubSub.addChild(roma);

napoli.addChild(new ItemElement(null,“http://www.ilmeteo.it/portale/taxonomy/term/2/0/feed?citta=Roma”));

PublishElement milano=new PublishElement(“Milano”);

pubSub.addChild(milano);

napoli.addChild(new ItemElement(null,“http://www.ilmeteo.it/portale/taxonomy/term/2/0/feed?citta=Milano”));

System.err.println(pubSub.toXML());

}

My question is: how can the clients subcribe to this service? Thank you vary much!!!

Hi,

http://www.xmpp.org/extensions/xep-0060.html#subscriber-subscribe describes how this works and I assume that this works in Openfire. Do you need some help with Smack creating PubSub client code (==> probably post the question in Smack Dev) or does this not work?

LG