Skip navigation
275 Views 1 Reply Latest reply: Jul 28, 2010 8:18 AM by veminick RSS
veminick Bronze 2 posts since
Jul 27, 2010
Currently Being Moderated

Jul 27, 2010 10:18 AM

create Account asmack throws error 400 bad request

Hello,

 

I am trying to make an appli on android which have to connect to a server ejabberd to first, whether it is needed, create en account or log into the server.

I am using smack here is my code:

try {
               /**
                * The abstract Connection class provides an interface for
                * connections to a XMPP server and implements shared methods which
                * are used by the different types of connections (e.g.
                * XMPPConnection or BoshConnection).
                * 
                * To create a connection to a XMPP server a simple usage of this
                * API might look like the following:
                */
 
               // Connect to the server
 
               con.connect();
               
 
                      // Create a connection to the igniterealtime.org XMPP server.
                 ConnectionConfiguration connectionConfiguration = null;
                 connectionConfiguration = new ConnectionConfiguration("server.com", 5222);
                //connectionConfiguration.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled);
                con = new XMPPConnection(connectionConfiguration);
 
               
               
               con.getAccountManager().createAccount("log@server.com", "azer");
//               Log.i(TAG, "support account creation : "
//                         + am.supportsAccountCreation() + "\n"
//                         + am.getAccountInstructions());
//               am.createAccount("thomas", "azer");
          } catch (Exception e) {
               Log.e(TAG, e.getMessage());
          }
 
 
 

 

The supportsAccountCreation() method return true and when I am creating an account from empathy it works fine.

However this code always return a 400 bas request error.

 

there is also a warning keystoreException: Keystore jks implementation not found.

If any one have any idea.

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points