The Response
To complete our initial look at XML streams in a Jabber client/server conversation, let’s have a look at what the Jabber server might send in response to the opening tag from the client:
<stream:stream
xmlns:stream='http://etherx.jabber.org/streams'
id='3AFD6862'
xmlns='jabber:client'
from='jabber.org'>
There are a couple of differences between this opening tag from the server
and the opening tag from the client—that is, above and beyond the fact that
this response’s opening tag is for a document that is going to be streamed
along the socket in the opposite direction from that of the document to which the request’s opening tag belongs. The first difference is that there’s a
from attribute instead of a to
attribute. The second difference is that there’s an extra
attribute—id. Let’s look at these in turn.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access