Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > BOOK: Professional XMPP Programming with JavaScript and jQuery
| Search | Today's Posts | Mark Forums Read
BOOK: Professional XMPP Programming with JavaScript and jQuery
This is the forum to discuss the Wrox book Professional XMPP Programming with JavaScript and jQuery by Jack Moffitt; ISBN: 978-0-470-54071-8
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional XMPP Programming with JavaScript and jQuery section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 24th, 2010, 05:07 PM
Registered User
 
Join Date: Sep 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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?
 
Old September 28th, 2010, 02:26 PM
Registered User
 
Join Date: Sep 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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):
Code:
<iq to='jabber.org'
    type='set'
    xmlns='jabber:client'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<create node='ThisIsANodeName'/>
</pubsub>
</iq>
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:

Code:
<iq xmlns='jabber:client'
    to='tiracu@jabber.org/d99ca80ebe42666e'
    from='tiracu@jabber.org'
    type='result'/>
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.
 
Old September 29th, 2010, 09:52 AM
Registered User
 
Join Date: Sep 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
 
Old December 5th, 2010, 04:37 PM
Wrox Author
Points: 702, Level: 10
Points: 702, Level: 10 Points: 702, Level: 10 Points: 702, Level: 10
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2010
Posts: 178
Thanks: 0
Thanked 16 Times in 15 Posts
Default

Quote:
Originally Posted by tiracu View Post
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.




Similar Threads
Thread Thread Starter Forum Replies Last Post
jabber-rpc libraries flossy BOOK: Professional XMPP Programming with JavaScript and jQuery 2 April 17th, 2010 02:25 PM
academicearth.org abilify BOOK: Ivor Horton's Beginning Visual C++ 2008 ISBN: 978-0-470-22590-5 0 January 26th, 2010 08:55 PM
Error-Object does not support doesn't support this bootsy Classic ASP Basics 1 May 25th, 2008 07:14 PM
package org.xml does not exist?? CFerthorney J2EE 1 May 10th, 2004 05:26 PM
org.apache.struts.* bongo76 Apache Tomcat 1 April 18th, 2004 05:06 AM





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