[JDEV] PubSub Subscription Requests
Stephen Pendleton
pendleto at movsoftware.com
Fri Mar 7 13:27:33 CST 2003
Understood. Makes sense. The reason is that in my client I am attempting to
automatically allow people to subscribe to my node, and I am attempting to
find a robust way of parsing this node.
For instance if I get:
<field var="FORM_TYPE" type="hidden">
<value>http://jabber.org/protocol/pubsub</value>
</field>
<field var="node" type="hidden">
<value>generic/pgm-mp3-player</value>
</field>
<field var="subscriber_jid" type="hidden">
<value>sub1 at foo.com</value>
</field>
<field type="fixed">
<value>The pubsub node is: generic/pgm-mp3-player</value>
</field>
<field type="fixed">
<value>The subscriber JID is: sub1 at foo.com</value>
</field>
as part of the subscription request, I need to send back the following:
<field var="FORM_TYPE">
<value>http://jabber.org/protocol/pubsub</value>
</field>
<field var="node">
<value>generic/pgm-mp3-player</value>
</field>
<field var="subscriber_jid">
<value>sub1 at foo.com</value>
</field>
I am assuming that the var attributes in the "field" tag are not
nescessarily always going to be "node" and "subscriber_jid".
I guess my feeling is that the concept of a "node" is key to the entire
pubsub concept, but is only defined here in this transaction as a field in
the x:data form. This is fine, but if you are trying to do this without user
interaction there doesn't seem to be a robust way that the client can obtain
the node that the request refers to (since the "node" field may be named
something else in a different x:data form). Maybe I am missing something
here..
Thanks
-----Original Message-----
From: jdev-admin at jabber.org [mailto:jdev-admin at jabber.org]On Behalf Of
Peter Millard
Sent: Friday, March 07, 2003 1:16 PM
To: jdev at jabber.org
Subject: Re: [JDEV] PubSub Subscription Requests
Stephen Pendleton wrote:
> Now my question/comment is, is this the best way to do this? What is the
> advantange of sending a jabber:x:data form? Will there be implementations
> that require jabber:x:data data to be sent back? The only reason I ask
this
> is because it seems to me it is pretty much the same as a simple "roster
> subscription request" that would require only a simple yes/no response
sent
> back.
The advantage of using x-data here is so that x-data compliant clients do
not
need to implement yet another namespace for just a simple form. X-Data is
perfectly suited for this type of operation. It's also not JUST a yes/no
since
the approver probably wants to see who the requestor is, and what NODE they
are
trying to subscribe to. Thus, there is a some basic information that needs
to be
displayed to the approver. In general, it's just not necessary to force
clients
to implement yet another bit-o-protocol, when we already have something that
can
be used. Re-use of protocol is a GOOD thing :)
pgm.
_______________________________________________
jdev mailing list
jdev at jabber.org
http://mailman.jabber.org/listinfo/jdev
More information about the JDev
mailing list