Quantcast
Channel: Ignite Realtime : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 10742

parsing/setting content of error conditions (e.g. redirect)

$
0
0

Some error conditions (redirect, gone, etc.) contain a text node with information, in the case of redirect it is typically the IRI of the entity that is redirected to.

 

Example:

 

C: <presence

  from='juliet@im.example.com/balcony'

  id='y2bs71v4'

  to='characters@muc.example.com/JulieC'>

  <x xmlns='http://jabber.org/protocol/muc'/>

  </presence>

 

 

E: <presence

  from='characters@muc.example.com/JulieC'

  id='y2bs71v4'

  to='juliet@im.example.com/balcony'

  type='error'>

  <error type='modify'>

  <redirect xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>

  xmpp:characters@conference.example.org

  </redirect>

  </error>

  </presence>

              

 

 

See also: Extensible Messaging and Presence Protocol (XMPP): Core

 

Smack currently does not parse the text content and  offers no way to set it.

This would only require these minor changes:

  • addition of parser code for text node of some error types in PacketParserUtils.parseError
  • extension of XMPPError to allow access to the content
  • extension of XMPPError.toXML() to include it in the serialization

Viewing all articles
Browse latest Browse all 10742

Trending Articles