[JDEV] 406 presence error

Andy Ames agames at sbcglobal.net
Sun Aug 3 22:04:37 CDT 2003


Hi,

I cannot seem to make sense of the protocol for presence stanzas. In each
case below, I get a 406 - "Not Acceptable" error. The stream is opened and
the user is authenticated with no problem. Following are the various
presence stanzas I attempted. At the bottom of this post is the
authentication stanzas that occurred before I attempted presence.

1) According to XMPP (and the Exodus XML debug output window), the following
should work. Or am I missing something?

SENT: <presence/>
RECV: <presence type='error'>
        <error code='406'>Not Acceptable</error>
      </presence>

2) I also attempted filling out the details.

SENT: <presence>
        <show>chat</show>
        <status>Online</status>
        <priority>1</priority>
      </presence>
RECV: <presence type='error'>
        <show>chat</show>
        <status>Online</status>
        <priority>1</priority>
        <error code='406'>Not Acceptable</error>
      </presence>

3) I tried using the "to" attribute.

SENT: <presence to="jabber.org">
        <show>chat</show>
        <status>Online</status>
        <priority>1</priority>
      </presence>
RECV: <presence type='error'>
        <show>chat</show>
        <status>Online</status>
        <priority>1</priority>
        <error code='406'>Not Acceptable</error>
      </presence>

I must be doing something fundamentally wrong. Can someone spot it?

Andy

Authentication business...

SENT: <?xml version="1.0"?>
      <stream:stream xmlns:stream="http://etherx.jabber.org/streams"
                     xmlns="jabber:client"
                     to="jabber.org">
RECV: <stream:stream xmlns='jabber:client'
                     xmlns:stream='http://etherx.jabber.org/streams'
                     from='jabber.org'
                     id='0123456789'>
SENT: <iq type="get" to="jabber.org" id="0123456789">
        <query xmlns="jabber:iq:auth">
          <username>myusername</username>
        </query>
      </iq>
RECV: <iq type='result' id='0123456789'>
        <query xmlns='jabber:iq:auth'>
          <username>myusername</username>
          <password/>
          <digest/>
          <sequence>0</sequence>
          <token>A1B2C3D4</token>
          <resource/>
        </query>
      </iq>
SENT: <iq type="get" to="jabber.org" id="0123456789">
        <query xmlns="jabber:iq:auth">
          <username>myusername</username>
          <password>mypassword</password>
        </query>
      </iq>
RECV: <iq type='result' id='0123456789'>
        <query xmlns='jabber:iq:auth'>
          <username>myusername</username>
          <username>mypassword</username>
          <password/>
          <digest/>
          <sequence>0</sequence>
          <token>A1B2C3D4</token>
          <resource/>
        </query>
      </iq>




More information about the JDev mailing list