xmpp - Java - trying to prebind converse.js using bosh but not able to get the sid and rid...using the smack bosh -


I am trying to connect to open fire using Scout Bosch and pre-bind to converse.js in web page I am trying to do My Bosch code

  BOSH configuration config = new BOSH configuration (false, "host", 7070, "/ http-bind /", "", "xmpp: 127.0.0.1: 5222 "); Bosch Connection Connection = New Bosch Connection (Config); Try {connection.connect (); connection.login ("United Nations", "PW"); String sss = connection.getConnectionID (); String Bosch = Connection. BOSH_URI; } Catch (Exception E) {}   

How can I install a bosh connection and get the necessary CD, rid and jade from the session ....

Any help is greatly appreciated.

I managed to do this by adding the following work to Skak Bosch Connection Library Category: < Pre> increases the public class BOSHConnection connection {... public string getSid () {return client.getSid (); } Public Long Mill Rights () {Return Client.Get Arid (); } ...}

You should then remember that the last id used by the Skak Scout Library is and you will have to increase it for the next request for your pre-bind.

The Z is already available through BOSHConnection.getUser ();

I should also flag that I had to change Bosconction. Login McTon to get a converse pre-bind to work with Skake.

  // changed: preserve current API - Call the new pre-bound aware function public zero login (string username, string password, string processing) XMPPException {login (username, Password, resource, wrong); } // Added: Using the Basic Login Function with Preband Aware Public Zero Login (String Username, String Password, String Resources, Boolean Prebind) xmppps {if (!); } ... unchanged // indicate that we have now been certified certified = true; Anonymous = False; // Added: The prebund only needs to be connected and certified if (prebind) {return; }   

Then only connection with the

  // login in the web app. Login (username, password, "", true);   

This is the first thing that requires execution of all the roster and presence material that does half of the post after the login function. My argument here is that the XMPP server will actually see two connections (for an SME and to talk to each other) and this is the presence that will be targeted for XMPP messages - and we want this to be the conversation .

EDIT: This is a long code sample for

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -