0
votes

I'm currently experimenting with Openfire + Smack + PubSub combination. I'm creating a notification group everyone should be subscribed on. I can connect the server and create a new node, but experiencing problems with subscribing users on the new node.

The code is

Node leaf = pubSubManager.createNode("testNode_-203538675");
leaf.subscribe("test10@xmpp");

The server name is "xmpp" without any domain extension (good choice, I know:) and the user exists there. While executing the code I'm getting the following:

SENT (0): <iq to='pubsub.xmpp' id='U508W-16' type='set'><pubsub xmlns='http://jabber.org/protocol/pubsub'><subscribe node='testNode_-203538675' jid='test10@xmpp'/></pubsub></iq>
RECV (0): <iq type="error" id="U508W-16" from="pubsub.xmpp" to="admin@xmpp/ag1pbgs2yn"><pubsub xmlns="http://jabber.org/protocol/pubsub"><subscribe node="testNode_-203538675" jid="test10@xmpp"/></pubsub><error code="400" type="modify"><bad-request xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><invalid-jid xmlns="http://jabber.org/protocol/pubsub#errors"/></error></iq>

Can anyone give me a clue, where to dig and why am I getting the invalid-jid response? Maybe I should check the list of users on the server through the runtime?

1
OMG, I've just realized I can't subscribe someone else under different account.Ivan Tamashevich

1 Answers