Using XML

To set user status you need to set HTTP header Content-Type to application/xml

    <status>On the phone</status>


  • available - may be:

    • true - user is available/connected (default)
    • false - user is unavailable/disconnected
  • priority - an integer of presence priority. (It should be always set as a negative value to make sure that messages are not dropped) (default: -1)
  • show - may be one of presence/show element values (optional)

    • chat
    • away
    • xa
    • dnd
  • status - message which should be sent as a presence status message (optional)

As a result server will return following XML:

  <status>On the phone</status>

This will confirm that user with resource tigase-external has it presence changed (look for success element value).