p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional XMPP Programming with JavaScript and jQuery (http://p2p.wrox.com/forumdisplay.php?f=542)
-   -   Ch. 9: jabber.org doesn't support instant nodes for pubsub? (http://p2p.wrox.com/showthread.php?t=81037)

tiracu September 24th, 2010 05:07 PM

Ch. 9: jabber.org doesn't support instant nodes for pubsub?
So in chapter 9, SketchCast is set up to use instant nodes. If you don't enter a node, it sends a node creation request; if you enter a node, it assumes you're a subscriber and tries to subscribe to that node.

Using jabber.org, though, I get a "SketchCast creation failed with not-acceptable/nodeid-required" message whenever I try to create a node this way. And, of course, if I give a node name, it tries to subscribe instead and gives a "Subscription failed with item-not-found" message.

Am I missing something, or did they stop allowing instant nodes since this was written and I'll have to add something to the login dialog telling it whether to subscribe to or create the node?

tiracu September 28th, 2010 02:26 PM

Looking into it more, I'm starting to think that jabber.org supports pubsub, but something in the SketchCast code might be wrong.

Here's what SketchCast sends (grabbed from the createiq var just before it's sent, with spacing added for clarity):

<iq to='jabber.org'
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<create node='ThisIsANodeName'/>

Note I'm sending to jabber.org rather than pubsub.jabber.org; as far as I can tell, this is the right destination. pubsub.jabber.org can never be found, pinged, anything.

If I send the above stanza through Peek, I get this:


<iq xmlns='jabber:client'

So that's good news; everything's working. Unfortunately, when SketchCast sends the above, I get "SketchCast configuration failed with service-unavailable". Or if I try a second time with the same node name, "SketchCast configuration failed with conflict".

I looked it up, and 'conflict' seems to mean the node already exists - which suggests that the first time should be successful, and it's throwing the error dialog when it shouldn't be.

Am I mistaken here, or is there something wrong with the SketchCast code?

EDIT: Just to clarify, I'm currently using a radio button input to determine whether the intent is to Publish or Subscribe and entering a node name, rather than try to use instant nodes.

tiracu September 29th, 2010 09:52 AM

First, I'm pretty positive at this point that jabber.org does NOT support instant nodes. That can easily be solved by adding a piece to the login dialog where the user selects either publish or subscribe, though.

Node configuration, however, is the problem. When SketchCast sends off the IQ to configure the node, it gets a "service-unavailable" response which, according to the XEPs, indicates 'Ad-hoc commands not supported'.

I must admit that I don't entirely understand what that means, but I would guess it means that the client cannot simply send commands to the server and must instead only do so in responses? Basically, though, I'm unsure where to proceed from here.

metajack December 5th, 2010 04:37 PM


Originally Posted by tiracu (Post 263868)
First, I'm pretty positive at this point that jabber.org does NOT support instant nodes.

I believe jabber.org switched XMPP servers from ejabberd to M-Link sometime back. M-Link probably doesn't support (or isn't configured for) instant nodes.

This is unfortunate because it is not really under my control. Your best bet is to find another publicly available XMPP server that does support this feature, or to run your own server.

All times are GMT -4. The time now is 01:18 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.