powered by Jive Software

Please Help on connection


Can somebody tell me why, when a connection in started, in the generated XML, type is GET and not SET.

The server I try to reach needs the first connection to be of type SET and not GET.

Where can I modify that?

I looked in file Authentication::getChildElementXML().

I can not figure out in which file type is set to GET or SET.



I’'m not sure if you are referring to the authentication procedure with XMPP servers. Smack implements the url=http://www.jabber.org/jeps/jep-0078.html"JEP-0078: Non-SASL Authentication"[/url] in order to achieve the client-server authentication which is the standard specified by XMPP.

We could say that there are four conceptual steps involved in this procedure.

  1. Client Opens Stream to Server

  2. Server Opens Streams to Client

  3. Client Requests Authentication Fields from Server

  4. Client Provides Required Information (Digest)

For each step there is an XML message involved. In this examples you can see that it is required to send a packet of type GET in step 3 before you send the SET packet.

<stream:stream to=''shakespeare.lit'' xmlns=''jabber:client'' xmlns:stream=''http://etherx.jabber.org/streams''>
<stream:stream from=''shakespeare.lit'' xmlns=''jabber:client'' xmlns:stream=''http://etherx.jabber.org/streams'' id=''3EE948B0''>
<iq type=''get'' to=''shakespeare.lit'' id=''auth1''>
  <query xmlns=''jabber:iq:auth''>
<iq type=''set'' id=''auth2''>
  <query xmlns=''jabber:iq:auth''>

Which server are you using? Are you getting any error?


– Gato

Thank you for your answer,

I solved my problem.

In fact, My script using smack works fine on Jabber servers I’'ve tested (Jabber.com, local jabberd, …).

But didn’'t work on the server I tried to reach.

This is because it’'s a private server based on Jabberd that absolutely required a particular resource (not easy to find out). The response from server was to strange.

No it works fine thanks