example:
TO = "juliet@capulet.com" From = "flomeo@montague.net" TYPE = "Error">
message>
3.1.4
Type = "groupchat"
This message needs to be displayed in the interface of a chat room.
example:
message>
3.2.
In addition to setting the "Type" property, you can also modify the
3.2.1
"From" attribute
Message sender's logo. Overall, the "from" of the Jabber ID must be the format of User @ host / resource. From XML's point of view, this attribute must be included in all
example:
Message> 3.2.2
"Id" attribute
The "ID" attribute is a unique sign as a message. It is generated by a Jabber client or a client library (similar to WinJab or Jabbercom), the client is used to use it for tracking messages (such as information that will be sent to a group chat room and the message received from this chat room, or The message is identified with the error that it might generate. The "ID" attribute is optional and is not available in other components of the system.
example:
message>
3.2.3
"TO" attribute
Referring to the message. The "To" attribute of the Jabber ID is usually User @ Host / Resource format, and User @ Host can also be accepted. If the recipient is online, the user is solved by user @ host / resource, if the user is not online, send offline memory directly. This attribute is all of all
example:
message>
Pi Elements in Message />
The following sub-elements are used to define a context or data element of a Jabber message.
3.3.1
This element contains the main text of the message. The
3.3.2
.
This element will be used when the message type property is set to "Error". The error code is defined by a "type" property. This "Type" property contains the number of code, and contains a text description of this error via
example:
TO = "juliet@capulet.com" From = "flomeo@montague.net" TYPE = "Error">
message>
There is an illegal code in the attachment and the meaning of the meaning defined.
3.3.3
.
element combines XHTML namespace (http://www.w3.org/1999/xhtml), provides a message with a message, just like in the Email world, simultaneous sending normal text and HTML version The email message is the same. This feature is used by W3C
The basic XHTML format (http://www.w3.org/tr/xhtml-basic/) jabber.org/draft-proto/html/xhtml.html). All XHTML root elements must be html>. In this root element, it supports elements defined in any basic XHTML format, but not each element can be understood by instant messaging. 3.3.4
This is an optional element that contains the title of the message.
3.3.5
When a Jabber client sends a "chat" type message, the unique thread ID is generated (usually a HASH generated by the sender's Jabber ID and the current time). Message senders and recipients in the chat contain a
From = "juliet@capulet.com/balcony" TO = "romeo@montague.net/orchard" TYPE = "chat"> 226C 2C 04be 8f 2E 19A 2151B threeread>
message>
From = "romeo@montague.net/orchard" TO = "juliet@capulet.com/balcony" TYPE = "chat"> 226C 2C 04be 8f 2E 19A 2151B threeread>
message>
3.3.6
l jabber: x: autOUpdate
l jabber: x: delay
l jabber: x: encrypted
l jabber: x: OOB
l jabber: x: roster
These namespaces are more fully described in the Jabber namespace below.
Here is an example of display context using Jabber: x: DELAY namespace in the joined group chat room:
Type = 'groupchat' From='cauldron@conference.witches.org '> Stamp = '10541031t21: 43: 40 ' > Cached in GC History x> message> 4. All entities showing online status is not "available" is "unavailable". "Available" status indicates that the sender can receive a message immediately. The "unavailable" state indicates that the sender cannot receive any data at the current time. By default, all 4.1. "Type" attribute 4.1.1 Type = "available" If there is no "Type" property, the online status package will be set to type = "available" to provide information when the user is online. A Type = "Available" online status package typically contains a example: From = "juliet@capulet.com/balcony" TO = "romeo@montague.net/orchard" /> presence> l Away - Jabber user or entity online, but can not contact it immediately l chat - jabber users or entities and have fun chat l DND - Jabber user or entity online, but do not want to be disturbed ("DND" means "do not disturb") l XA - Jabber user or entity online, but has left for a long time ("XA" means "extended Away") 4.1.2 Type = "error" When an online status package is sent to a non-existing JID, the server will return a Type = "error" online status package when an error occurs when an error is sent when the online state request is sent. Here is an example (pay attention to the type of domain name): TYPE = "Subscribe" TO = "romeo@montague.nett" /> Reply example: From = "romeo@montague.nett" TO = "juliet@capulet.com/balcony" TYPE = "Error"> > Remote Server Timeout. Unable to Deliver Packet. error> presence> 4.1.3 Type = "probe" An online status information request is issued to a particular entity (entity cannot send online status messages). Server instead of the client, performing a probe request. In fact, although the Jabber client also sends a request to detect whether a Jabber user is online, it is usually a server-side issuance request. Note that the server will issue a probe only when the user of the user is requested by the user requesting the request. In the following example, we will see our hero Romeo issued a probe request to Juliet, and the server where the Juliet is located reply to a "status report package" (including Jabber: x: DELAY name space indicated last online status update time) stamp) Exploring the request: From = "romeo@montague.net" TO = "juliet@capulet.com" TYPE = "probe" /> Reply to the example of the request: From = "juliet@capulet.com/." To = "romeo@montague.net"> XMLns = "jabber: x: delay" From = "juliet@capulet.com/." Stamp = "15310309T23: 47: 15" /> presence> 4.1.4 Type = "subscribe" Send a request, this request is that the recipient automatically sends online status information to the sender when it changes its online state. example: From = "romeo@montague.net" TO = "juliet@capulet.com" TYPE = "subsiscribe" /> 4.1.5. Type = "subsiscribed" Send a message indicating that the sender accepts a request for recipients to reproduce status subscriptions. From now on, when the sender's online status information changes, the server will send the status information to the recipient. example: From = "juliet@capulet.com" TO = "romeo@montague.net" TYPE = "subsiscribed" /> 4.1.6 Type = "unavailable" example: From = "juliet@capulet.com" TO = "romeo@montague.net" Type = "unavailable"> presence> 4.1.7 Type = "unsubscribe" Send a request indicating that the recipient stops sending an online status information to the sender. example: From = "juliet@capulet.com" TO = "romeo@montague.net" Type = "unsubscribe" /> 4.1.8 Type = "unsubscribed" This type of online status package has two uses: 1. Send a notification indicating a request for the sender to accept the recipient for requests that do not subscribe to its online status information. The server will no longer send the sender's online status information to the recipient. 2. Reject a subscription request. The server will no longer send the sender's online status information to the user attempt to subscribe to its online status information. example: From = "romeo@montague.net" TO = "juliet@capulet.com" TYPE = "unsubscribed" /> 4.2. Other In addition to setting the "Type" property, you can also modify the 4.2.1 "From" attribute Identify the sender of the online status package. The general jabber ID must be written in the format of User @ host / resource in the "From" property. From XML's point of view, this attribute is necessary for all example: 4.2.2 "Id" attribute A unique verification is configured for the online status request package. The "ID" property is generated by the Jabber client or client library (such as Gabber or Jabbercom), and the client is verified by the trajectory of the online status package. The "ID" attribute is optional and cannot be used anywhere elsewhere. example: 4.2.3 "TO" attribute Logo the recipient of the online status package. General Jabber IDs are in the "to" attribute. User @ host / resource format, the format of the user @ Host is also possible, but when the recipient is online, it will be converted to user @ host / resource. In the general usage of Jabber, the Jabber client issues an online status package to the server, and the server sends these online status packages to all users on the user. When a "to" property is not included in the presence> The server sends an online state example of the specified user: TO = "romeo@montague.net/orchard" From = "juliet@capulet.com/balcony"> presence> 4.3. The following elements are used for the 4.3.1 In Jabber, a user can establish the same number of connections based on the number of devices or positions known in Jabber. The user can give each resource to a digital priority (by setting the Jabber client assigned to the resource), this priority is communicating with the child element When the online status package is sent to the server, the server has the ability to determine which connection resource needs to assign a single Jabber ID, which will receive a message sent to the Jabber ID, because the highest number of resources is default or the first Resources. If the highest priority resource is unavailable, messages and other Jabber communications will be sent to the second high priority resource (when other resources are not available, a client without priority from the default number to 0 can also be the first Resource) For example, Julie can connect her account juliet@capulet.com through two resources: The Balcony and The Chamber of THE Chamber. If the priority of the "Balcony" resource is set to " 2 " And the priority of "chamber" resources is set " 1 " And both resources can be connected, and the message will be sent to juliet@capulet.com/balcony, not juliet@capulet.com/chamber. 4.3.2 Optional Label meaning . The 4.3.4 l jabber: x: autOUpdate l jabber: x: delay l jabber: x: encrypted l jabber: x: OOB l jabber: x: roster These namespaces are more fully described in the Jabber namespace below. 5. Information / Query (IQ) Build a fundamental session between two entities in two entities, and allows the entity to return to the XML format request and response. Information / query is the main use of the use of public user information, such as name, email, address, etc. But its flexible design makes any kind of session. Any entity identified by a Jabber ID can be sessions through one IQ with other entities. 5.1. "Type" attribute 5.1.1 Type = "error" Indicates that the query failed. The actual error is described in the example: q> 5.1.2 Type = "get" Find a message to the information that queries the namespace. If an attribute is not set, the default is included in the query. A type = "get" example: q> 5.1.3 . type = "result" means the example: Vcard Data Goes Here vcard> q> 5.1.4 Type = "set" Indicates that the example: Vcard Data Goes Here vcard> q> 5.2. Other In addition to the "Type" attribute, IQ elements can also be modified by the following properties. 5.2.1 "From" attribute Represents the sender of the IQ package. From the XML point of view, this attribute is necessary. This attribute in the actual application is the server to increase and modify (to prevent certain spoofs), so the client's developer does not need to pay too much attention. Attributes. example: 5.2.2 "Id" attribute An IQ package is only a unique identifier. The JABBER client or customer library generates "ID" attributes, the client identifies the example: 5.2.3 "To" attribute Referring to the receiver of the IQ package. In the Jabber client, the format of the Jabber ID corresponding to the "To" property is user @ host / resource. User @ host is also possible, if the user is online, user @ Host will be replaced with user @ host / resource, if the user is not online, user @ Host will directly point to a offline module (for similar server-side gateways, non-user entities The situation is different because they do not have resources and just simply identify a "Server" port of the Jabber ID .jud.jabber.org - Jabber User Directory is such an example). If the 5.3 The child elements of the 5.3.1 . This property will be used when the attribute type of IQ is set to "Error". The error code is defined according to a "type" property containing the error number, and 5.3.3 The following example is the XML that will appear when I log in to the server through the Grabber client on my Linux machine. query> q> As you can see, the authentication query sends authentication information to the server through the client authentication namespace (Jabber: IQ: Auth). Generally, the Jabber core protocol retains Jabber: IQ: * Such a name space. Developers can expand the Jabber core by adding Jabber: IQ: * namespace. These will be more complete in the namespace below. An empty q> 6. Name Space Currently a standard name space in Jabber: l Jabber: IQ: Agent - Agent Tool l Jabber: IQ: Agents - Valid agent group l Jabber: IQ: Auth - Simple User Certification l Jabber: IQ: Autoupdate - version update application l Jabber: IQ: Browse - Jabber Browse l Jabber: IQ: Conference - General Conference l Jabber: IQ: Gateway - User Address Gateway l jabber: iq: last - last time l Jabber: IQ: OOB - Binding data output l Jabber: IQ: Private - Private Data Storage l jabber: iq: register - registration request l Jabber: IQ: roster - the flower name (contact list) management l Jabber: IQ: Search - User Database Query l Jabber: IQ: Time - Client time l Jabber: IQ: Version - Client Version l jabber: x: autOUpdate - version notification application l Jabber: x: Conference - Conference invitation l jabber: x: delay - the object displayed l Jabber: x: Encrypted - encrypted message l jabber: x: envelope - Message envelope l jabber: x: Event - Message event l jabber: x: eXpire - message termination l jabber: x: OOB - Binding data (file transfer) output l jabber: x: roster - internal flown booklet l jabber: x: Signed - Mark online status l vcard-temp - temporary VCARD Details of these namespaces will be described in detail below. 6.1. Jabber: IQ: Agent - Agent Tool The agent tool namespace contains all the tools for a proxy. Jabber: IQ: Angents query is usually used to register a specified service, agent, and transmitter. It may also verify all tool details for specified agents. For example, a client can determine if an open registration can be done. example: agent> query> q> 6.2. Jabber: IQ: Angents - list of agents available The available proxy list namespace contains a set of entities, which have some special tools and can serve another entity. In most cases, the list of available proxy is used to display a list of available transmitters on a server. Note: This name space is against the supporters of Jabber: IQ: Browse (??). example: You May Register and Create a Public Searchable Profile, And Search for other register Jabber Users. description> agent> agent> query> q> 6.3. Jabber: IQ: Auth - Simple client authentication Simple customer authentication namespace is a simple mechanism for authenticating clients, which creates a resource for the connection between the client to the server. The authentication successfully returns a type = "result" IQ response. In order to be successful, an error IQ element is returned. If the namespace or password is not sent, if the server allows, the server will create an anonymous resource. example: query> q> 052C 48C 455BF21D937CCF17225916D9486B09 digest> query> q> query> q> 6.4. Jabber: IQ: AutoupDate - Release Update Application Version Update Application Name Space Allows the client to apply for requests to all available software updates. example: q> 6.5. Jabber: IQ: Browse - Jabber Browse Jabber browsing the role of the namespace is that one is a way to increase the structure of the Jabber IDs in the Jabber world, one is to discover the services or applications provided for different Jabber entities. The basic concept of a Jabber browse is a JID-TYPE (a concept of a simulation type of file). Here is the highest level of Jid-Types in imagination, but some other logic will be added over time: l application l conference l title l Keywords l l service l user Each of the above categories has a sub-class list, such as user / client, or user / device ("client" or "device" just a "resource" concept), conference / IRC, service / ICQ, title / inventory . Generally, by using Jabber: IQ: Browse Space You will have an element corresponding to a JID-Type category above, which typically has a "type" property of the specified subtype. Jabber: IQ: Browse is an agent or other service corresponding to the server instead of Jabber: IQ: Agents namespace. Below is an example of browsing the server: JABBER client sends: q> JABBER server returns: TYPE = "jabber" JID = "jabber.org" XMLns = "Jabber: IQ: Browse> TYPE = "JUD" JID = "users.jabber.org" Name = "Jabber User Directory"> service> TYPE = "AIM" JID = "aim.jabber.org" Name = "AIM TRANSPORT"> service> TYPE = "private" JID = "conference.jabber.org" Name = "Private Chatrooms"> service> service> q> An example in the meeting: conference> q> 6.6. Jabber: IQ: Conference - General Conference The general meeting namespace provides a mechanism for a conference room (such as a group chat room) and provides the entrance of the meeting room. This name space is used to use the iq> element to obtain information about a meeting room, including request information requiring to join this meeting room, and setting information for this meeting room (usually to join this room). The request to enter the room will be similar to: 1. Want to join the room submit a request for Type = "get". This XML will be the following form: q> 2. Accept the IQ response from the type = "result" from the room to be added, where there is a parameter required to enter the room. This XML will be the following form: q> The child elements of all the request elements here are optional. Nickname element indicates that you need a nickname in your room. The key (Secret) element indicates that the user entering the room needs to provide a password. Single (privacy) element indicates that if the user provides such an element in a type = "SET" IQ package, the conference server hides the user's true Jabbere ID. The name (Name) element is the name of the room (with Jabber: IQ: Browse, you can see the same room name). 3. Send the room to the current state to join. XML is as follows: 4. If you want to join the room submit a Type = "SET" IQ package and enters the required information. XML is as follows: query> q> Note that when the user's first selection is accepted, the user can submit multiple nicknames. If the user does not provide a nickname, the server assigns a nickname to the user. 5. Receive the notification of the room you join, this IQ is returned in the format: query> q> This unique ID number is a hash of the user's Jabber ID. 6.7. Jabber: IQ: Gateway - User Address Gateway Usually communications with non-Jabber network users, each non-Jabber network may have unique user addresses, and this address may not be unified. The user address gateway is to solve this problem, which gives the Jabber client to make the correct Jabber IDs when sending a subscription to non-Jabber network users. These by prompting and sessions for users, booting the information required to create a correct Jabber ID to be implemented. This ordinary interaction will be demonstrated below: 1. The client is sent to the gateway with Jabber: IQ: Get: Get: q> 2. The server returns an iQ containing the request approval and its description text. Please enter the aol screen name of the person You 10 Like to Contact. desc> query> q> 3. The client sends an IQ SET containing the specified information to the gateway: query> q> 4. The server returns an iQ result containing the correct Jabber ID query> q> 6.8. Jabber: IQ: Last - last online time The last online time name space provides a standard method, and one or more service updates of a Jabber entity can be queried by this method, or a customer last connection (or activity) to a server. The value returned every time is a second number. The entity for query can explain the information obtained by the following method: l User @ Server / Resource - the time for the last event of the user l User @ server - the time for the last connection of the user l Server - the last time that the server is started Example (server): q> q> Example (client): q> Disconnected query> q> 6.9. Jabber: IQ: OOB - Binding data output Binding Data Output Name Space Provides a standard method for client-client file transfer, and implements a special namespace through the server's transmission / proxy transmitter: example: query> q> 6.10. Jabber: IQ: Private - Private Data Storage Private data storage namespace is a mechanism for storing private data on the Jabber server. The stored data can be any legal XML data. The current status information stored at the server is the typical usage of this name space. Example 1 (Client storage private data): winjab> query> q> Example 2 (Client Restable Private Data): query> q> In addition, for private data storage, the 1.4 version server supports all valid namespaces on the server (with the namespace starting with "Jabber", the XML data for calling the Jabber system). This data exists in the roster of the user of the IQ package of type = "set" to the server side. Example 1 (Client Save Public Data): FAV_THINGS> query> q> Example 2 (Client Retrieving Public Data): query> q> 6.11. Jabber: IQ: register - Registration Request Registration Request Name Space Register one or more services. It is also used to update or delete a registration. example: Some Instructions to Be Displayed WHEN THE User is Filling Out The Form. instructions> query> 6.12. Jabber: IQ: Roster - Contact List Management The contact list management name space is the client to manage their flown books, which is saved on the server so that users can get it anywhere. The flower name is a list of commands for all subscription information on this account, including user nicknames and contact lists. When the user logs in from any resource, the server will send the roster to the user. The flower name is a list of entries. Each entry element has the properties describing it. Each entry element contains group elements it belongs. Here is the properties of the l "jid" is an entry Jabber ID l "subscription" all the current state of the user corresponding to the subscription related to this entry. It can be "none", "to" (with a subscription sent to this entry), "From" (send a subscription from this entry), "Both" (to, from), or " Remove "(delete an entry from the flower roster). l "ask" is the current state of a request for this entry. Subscribe indicates that the request is subscribed to the entry, and its value is that unsubscribe means cancels the subscription. l "name" means nickname By using a Subscribe example: Name = "romeo" Subscription = "none" ask = "Subscribe"> item> query> q> When a flown and album is changed on the server, the server will push this change to a user. This push is an ordinary q> In the above example, the server is pushing to a roster of the client, indicating that the user has subscribe to the current status information of Romeo@montague.net. Any time of a roster push may occur at any time, the connection is another connection to modify the resource or server (modify the subscription attribute). The client only uses a roster to send to change the display of the flower roster. But not every speech push is both a role. 6.13. Jabber: IQ: Search - User Database Query Any agent can be a query agent. For example, Jud query Jabber users, ICQ transmitters query ICQ users. The user sends a GET request to perform the query domain: TYPE = "get" ID = "1001" TO = "users.jabber.org" From = "romeo@montague.net/orchard"> q> The query agent returns a critical area: Matching Jabber User instructions> 96A 6A 2752A 21ABCB6D737130DD51DD50 key> query> q> Note that these domains are returned in the form of a prompt. The security of the transmission also contains a key (see below). The user can now perform standard queries within the allowed domain. The user sends a set request to the agent actual query: TYPE = "set" ID = "1002" TO = "users.jabber.org" From = "romeo@montague.net/orchard"> 604215C 3A 2A 24652C 69fd4efa 2A 7A 5746 key> query> q> The server returns the result according to the query: item> The returned style sent is a tool for the query agent. such as: item> query> q> Multiple queries results are pushed through the server. When all data is sent, the server will send the following return results: q> The client receives multiple "sets", each record, and finally receive "return" indicating "data end". In each example: TYPE = "get" ID = "1001" TO = "users.jabber.org" From = "juliet@capulet.com"> q> 6.14. Jabber: IQ: Time - Client Time The client time name space is a standard method for changing the current time. example: 2/15/00 4:55:06 PM display> query> q> 6.15. Jabber: IQ: Version - Client Version The client version name space is a standard method for obtaining the version information of another user's client. example: 0.8.1 (Powered by: jabberoo 1.0.0 version> 2.2.16 -22 I686 OS> query> q> 6.16. Jabber: x: AutoupDate - application version notification Version Change Application Name Space Make the server to notify the client when available in a new version of an app. example: Is Available, see http://winjab.sourceforge.net/ x> message> 6.17. Jabber: x: Conference - Conference invitation The meeting invitation name space allows users to invite other Jabber users to the specified meeting room. Related Information - The Jabber ID of the meeting room, embedded in example: example: x> message> 6.21. Jabber: x: Event - Message Event The message time namespace is a mechanism that identifies the status of a message. Now, the event is associated with a message: l L l l For the client, support for these message events is optional, and these message events are sent only if another user issues a request in the chat. Different JABBER clients will display different current status messages. Example of a request for message notification: From = "juliet@capulet.com/balcony" TO = "romeo@montague.net/orchard" ID = "1001"> x> message> Send a message notification: x> message> Multiple message events can be requested at the same time. 6.22. Jabber: x: eXpire - Message expiration Message expiration namespace is a simple extension of a limited survival event. If the message is stored offline, the server will no longer send the message. If a message is sent for a preview, the Jabber client can choose not to display the message. "Secondes" property defines the event sent by the message. example: message> 6.23. Jabber: x: OOB - Binding data output The binding data output namespace enables the user to realize the performance of file transfer by switching a standard URL. Urls exchange using Jabber: x: OOB can include any message (within a example: x> message> 6.24. Jabber: x: roster - Built-in flower name booklet The built-in flower name book enables the user to include the flown book entry in a message, which is easy to send a contact between the user. Each flower name album is included in a example: Here Are Some New Jabber Uses To Add to your contact list! body> item> item> x> message> 6.25. Jabber: x: Signed - current status with symbols The current status name space with symbols is used to support exchange using a public key (the client uses the PGP or GPG, and the server is encrypted using the same namespaces) encrypted current status information. A related name space, Jabber: x: Encrypted is used to support encrypted messages. example: ID8DBQA6KASV0XPC2 / Pofpkranz0aj9ueyywwwsreddikk3aymftftqqdjwcfbcld JCSuor0fls Rdfjapasmgsm Inanm x> presence> 6.26. VCard-Temp - Temporary VCARD The VCARD format is an "e-commerce card standard format," by using direct exchange of personal data over the Internet, as in the environment under the non-internet ". Since the format of XML's VCARD has not been standardized, the Jabber.org project is temporarily set up for such a temporary name file before the XML's VCARD standard is established. Since there is no progress in the designation of the official standard of Vcard in these years, Jabber.org developers have created a project to attract other developers outside the JABBER community. Therefore, the last DTD of the last XML VCARD format may be found in the URL below: http://www.vcard-xml.org/ Example 1 (client request to vcard): q> Example 2 (The client receives VCARD data): Vcard Data Goes Here vcard> q> Example 3 (Send VCARD to the server): Vcard Data Goes Here vcard> q> 7. Use example This section provides some different views on the Jabber protocol, and is expounded in use. Each of the following examples show a Jabber user to complete a full task message flow, which includes receiving and transmitting, such as registering a server, login, changing the current state, or sending a message. If time allows, I will take this part more. 7.1. Jabber user registration This use case is the evil display Jabber user opens a socket connection to the server, as well as the server's response (such as: 1. Jabber users apply for a Socket connection on the server by turning on an XML stream from the client to the server. Send: To = 'capulet.com' XMLns = 'Jabber: Client' XMLns: stream = 'http: //etherx.jabber.org/streams'> 2. The server responds by turning on an XML stream from the server to the client. Recv: From = 'capulet.com' ID = ' 180763465 ' XMLns = 'Jabber: Client' XMLns: stream = 'http: //etherx.jabber.org/streams'> 3. Jabber users provide a registration account (in theory, this requires a different order: first ask the server what information you need, and then the server know what kind of information needed; but in practice, it is assumed to be required. : User name, resource, password) information. Send: TYPE = 'set'> query> q> 4. The server responds to an empty type "result" IQ element, indicating that the registration has been successful. Recv: TYPE = 'result' /> 7.2. Jabber user landing 1. Jabber users ask the server to log in to the information provided. Send: TYPE = 'get'> query> q> 2. The server prompts the Jabber user to log in to the information. Recv: TYPE = 'RESULT'> query> q> 3. Jabber users provide the information you need - in this case, it is a Send: TYPE = 'set'> 0A 075cb88361b 110F B9D7 hash> query> q> 4. The server responds to an empty type "result" IQ element, indicating that the landing is successful. Recv: TYPE = 'result' /> 5. Jabber user sends the current state to the server and indicates its online. Send: presence> 7.3. Jabber users add a contact 1. The Jabber client adds a contact (just the preparatory operation) on the roster. Send: Name = 'Remeo' /> query> q> 2. Jabber users send a subscription request for that contact. Send: presence> 3. The server sends a flower list to the user a new entry and a type "None" subscription (already already available). Recv: Name = 'romeo' Subscription = 'none' /> query> q> 4. The server sends a type "Result" IQ package that means that the flower name is successful (it is a bit doubtful, this package is sent from Jabber users to Jabber users!) RECV: From='juliet@capulet.com/balcony ' To='julie@capulet.com/balcony ' TYPE = 'RESULT'> 5. The server sends another flower list to push, this time is the ask = 'subscribe' attribute, indicating the status of the subscription being undetermined. Recv: ask = 'Subscribe' Jid='Romeo@montague.net ' Name = 'romeo' Subscription = 'none' /> query> q> 6. What will Romeo will the next response to the subscription request? Now we assume that the subscription is "end" with Romeo accepting subscription requests. RECV: From='romeo@montague.net ' To='juliet@capulet.com ' Type = 'subscribed' /> 7. The server will send a flower list again to the client, this time subscription = 'to', indicating that the subscription request is accepted (Juliet can now subscribe to the current state of Romeo). Recv: Jid='Romeo@montague.net ' Name = 'romeo' Subscription = 'to' /> query> q> 7.4. Jabber user gets the roster Send: q> Recv: Jid='Romeo@montague.net ' Name = 'romeo' Subscription = 'Both' /> query> q> 7.5. Jabber user sends a message Send: message> Note: The server adds a source address based on the session information of the Jabber user, so that the recipient has included the source address. 7.6. Jabber users change the current state Send: presence> 7.7. Jabber user logs out It is easy to log out, just need to close Send: stream: stream> Recv: stream: stream> 8. References This Agreement refers to the following documents l Jabber Development Guide (http://docs.jabber.org/jpg/) l Jabber Agreement - Standard (http://docs.jabber.org/proto/) l Jabber protocol - draft (http://docs.jabber.org/draft-proto/) l Romeo and juliet (http://tech-two.mit.edu/shakespeare/tragedy/romoistjuliet/full.html) 9. Conclusion This document provides a detailed count of XML protocols about Jabber. If you have any questions about this document, please contact the author by email or jabber, check with the author (Peter Saint-Andre), Stpeter@jabber.org when his account. 10. Copyright information This Document is Copyright 2001 by Peter Saint-Andre. PERMISSION IS granted to copy, distribute and / or modify this document under the Terms of the gnu free documentation license (http://www.gnu.org/copyleft/fdl.html), Version 1.1 or Any Later Version Published by The Free Software Foundation, with no Invariant Sections, No Front-Cover Texts, And no Back-cover Texts. You. Obtain A Copy of the gnu free documentation license from the free software findation by Visiting http://www.fsf.org/ or by Writing TO: The Free Software Foundation, Inc. 59 TEMPLE PLACE - Suite 330 Boston , MA 02111-1307 USA Appendix A Standard Error Code Below is some of the brief description of the error code in Jabber. The Jabber server generates these error codes under different error conditions. General Jabber error code is based on the RFC 2616 (http://www.ietf.org/rfc/rfc2616.txt) of HTTP specifications. However, Jabber does not use all HTTP error code, and the Jabber error code corresponds to the HTTP error code, usually only Jabber's own meaning. Note This appendix only includes the error code generated by the Jabber server, and does not include server-side components such as gateways to the external message system. Error Code Description Note 302 Redirect Although the HTTP specifier contains eight different code to indicate redirection, Jabber uses only one (used to replace all redirect errors). However, Jabber code 302 is reserved for future features, and there is currently no 400 bad request Jabber code 400 to inform the Jabber client, a request that requests cannot be identified because of its bad syntax. For example, when a Jabber client sends a subscription request to itself to send a message that does not contain the "to" attribute, the Jabber code 400 will generate. 401 Unauthorized Jabber Code 401 is used to notify the Jabber client that they provide errors, such as using an error password, or unknown username while landing a Jabber server. 402 The cost of the Jabber code 402 is reserved for future use, and it is not available. 403 Prohibiting Jabber Code 403 is used by the Jabber server to notify the Jabber client's request to identify, but the server refuses to execute. Currently only used password storage in the registration process failed. 404 Did not find the Jabber code 404 to indicate that the Jabber server does not find any content that matches the Jabberid, which is a Destination of a Jabber client sends a message. For example, a user intends to send a message to a non-existing JabberID. If the recipient's Jabber server cannot arrive, an error code from the 500th level will be sent. 405 The Jabber Code 405 that is not allowed is used in Jabberid that is not allowed to be identified by the 'from' address. For example, it may be generated, a non-administrator user attempts to send an administrator level message on the server, or a user attempts to send a Jabber server time or version, or send a different Jabberid VCARD. 406 Unacceptable Jabber Code 406 is used for the server because some reasons do not accept a package. For example, this may happen, a Jabber client tries to use Jabber: IQ: Private to store information on the server, but the current name space is started with "Jabber:" in Jabber: The beginning of the XML in Jabber ). Another possibility that 406 errors is that when a Jabber client tries to register with an empty password to a Jabber server. 407 Must registration Jabber code 407 The Jabber server generates Jabber Code 408 when a Jabber client cannot initiate a request during the server ready for the server. This code is currently only used in zero authentication mode used by the Jabber Session Manager. 409 Conflict Slightly 500 Server Internal Error When a Jabber server encounters an expected condition, the condition blocks the server from processing a package from the Jabber client, which is the Jabber code 500. Now, the only time that will trigger 500 error code is when a Jabber client tries to authenticate through server, and the authentication is not processed because some reasons are not processed (if you can't save your password). 501 Unauthorized When the server does not support the function of the Jabber client request, use the jabber code 501. For example, the code only when the Jabber client sends an authentication request, and the server sends a Jabber code 501 when the authentication request does not include any authentication method defined in the server configuration. This code is also used, when a Jabber client tries to register a server that is not allowed to register. 502 Remote Server Error When the forwarding a package fails because it cannot reach the remote server, use the Jabber code 502. The special example of this code includes a failure of a remote server, which cannot obtain the host name of the remote server, and the external time expired by the remote server error.