Smack

Add HTTP Binding support

Details

  • Type: New Feature New Feature
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 3.0.0 Beta 1
  • Fix Version/s: None
  • Component/s: Extensions
  • Labels:
    None
  • Acceptance Test - Add?:
    No

Description

Add support for Smack to connect to XMPP servers via HTTP binding.

Activity

Hide
André Heie Vik added a comment -

In order to be really useful, this will also require HTTP proxy support. With this in place, smack/spark would work inside most corporate firewalls.

Show
André Heie Vik added a comment - In order to be really useful, this will also require HTTP proxy support. With this in place, smack/spark would work inside most corporate firewalls.
Hide
Karl Pietrzak added a comment -

I'm willing to devote some resources if the developers create some interfaces, method stubs, etc. and point me in the right direction.

Show
Karl Pietrzak added a comment - I'm willing to devote some resources if the developers create some interfaces, method stubs, etc. and point me in the right direction.
Hide
Joseph Biron added a comment -

I second the notion that HTTP proxy support is a must

Show
Joseph Biron added a comment - I second the notion that HTTP proxy support is a must
Hide
Florent DELHOSTE added a comment -

Hi,

Do you foresee to develop the XEP-0124 soon ?
Almost firewalls don't allow conventionnal xmpp connection by socket 5222 or other.
It's a very interesting feature.

So, i hope to have some news from ignite...

Sincerly yours,

Show
Florent DELHOSTE added a comment - Hi, Do you foresee to develop the XEP-0124 soon ? Almost firewalls don't allow conventionnal xmpp connection by socket 5222 or other. It's a very interesting feature. So, i hope to have some news from ignite... Sincerly yours,
Hide
Guenther Niess added a comment -

I'm working on this issue. I think I will use the http://hc.apache.org/httpcomponents-core/ libary for standalone applications and also an interface for GWT applications (http://code.google.com/intl/de-DE/webtoolkit/).
I will attach my implementation here when it's finished. I think it will take some weeks.

Show
Guenther Niess added a comment - I'm working on this issue. I think I will use the http://hc.apache.org/httpcomponents-core/ libary for standalone applications and also an interface for GWT applications (http://code.google.com/intl/de-DE/webtoolkit/). I will attach my implementation here when it's finished. I think it will take some weeks.
Hide
Mike Cumings added a comment -

Guenther,

I've been working on a Java implementation of XEP-0124 (i.e., excluding XEP-0206) and am approximately 70% finished. My intent was to build up a general purpose XEP-0124 library which could then be pulled in as a dependency by smack and used to implement XEP-0206. If you're interested, I propose we work together toward this goal. Sound good?

Mike

Show
Mike Cumings added a comment - Guenther, I've been working on a Java implementation of XEP-0124 (i.e., excluding XEP-0206) and am approximately 70% finished. My intent was to build up a general purpose XEP-0124 library which could then be pulled in as a dependency by smack and used to implement XEP-0206. If you're interested, I propose we work together toward this goal. Sound good? Mike
Hide
Preferred Hidden added a comment -

Will this work with GAE (Google App Engine) when it is done since Guenther is working for GWT interface? I know that GAE, now, supports XMPP (sort of) for gtalk but smack will be a full blown XMPP compliant client.

Show
Preferred Hidden added a comment - Will this work with GAE (Google App Engine) when it is done since Guenther is working for GWT interface? I know that GAE, now, supports XMPP (sort of) for gtalk but smack will be a full blown XMPP compliant client.
Hide
Wesley Combs added a comment -

Mike or Guenther have you made any progress on this?

Show
Wesley Combs added a comment - Mike or Guenther have you made any progress on this?
Hide
Mike Cumings added a comment -

I've been making progress on the XMPP library. Guenther and one other gentleman contacted me early on about helping to work on this but I have not heard anything back either one of them. Help is certainly still welcome however since my available time has recently been sitting close to the zero mark (read: baby in the house)! :-/

The XMPP library I've been working on can be found at: http://kenai.com/projects/jbosh . It is fully functional according to spec for almost all of the important aspects needed for developing the Smack portion.

Sorry, I missed the GAE question for some reason. I don't know enough about GAE to be able to answer the question. I believe there would be a good chance of it working but it would depend on the implementation of xSocket/xLightweb - the HTTP libraries used by jbosh. That said, jbosh is designed to accommodate multiple underlying HTTP implementations so it wouldn't be difficult to add support should that be desired.

Hope this helps...

Show
Mike Cumings added a comment - I've been making progress on the XMPP library. Guenther and one other gentleman contacted me early on about helping to work on this but I have not heard anything back either one of them. Help is certainly still welcome however since my available time has recently been sitting close to the zero mark (read: baby in the house)! :-/ The XMPP library I've been working on can be found at: http://kenai.com/projects/jbosh . It is fully functional according to spec for almost all of the important aspects needed for developing the Smack portion. Sorry, I missed the GAE question for some reason. I don't know enough about GAE to be able to answer the question. I believe there would be a good chance of it working but it would depend on the implementation of xSocket/xLightweb - the HTTP libraries used by jbosh. That said, jbosh is designed to accommodate multiple underlying HTTP implementations so it wouldn't be difficult to add support should that be desired. Hope this helps...
Hide
Guenther Niess added a comment -

A first implementation of BOSH for Smack can be downloaded via subversion on http://svn.igniterealtime.org/svn/repos/smack/branches/bosh/. It's based on Mikes jbosh library and should work for HTTP connections without encryption. I will continue to work on this. But the last weeks I didn't spend much time in this project.

Show
Guenther Niess added a comment - A first implementation of BOSH for Smack can be downloaded via subversion on http://svn.igniterealtime.org/svn/repos/smack/branches/bosh/. It's based on Mikes jbosh library and should work for HTTP connections without encryption. I will continue to work on this. But the last weeks I didn't spend much time in this project.
Hide
Ginger Rivera added a comment -

Do you have any sample code for logging in? I have some code where I am able to connect but not log in:

public BOSHConnection login(String host, int port, String user, String password, String domain, String filepath)
{
BOSHConnection connection = null;
try

{ BOSHConfiguration config = new BOSHConfiguration(false, host, port, filepath, user + "@" + domain); config.setCompressionEnabled(true); // config.setSASLAuthenticationEnabled(true); connection = new BOSHConnection(config); output(Data.INFO, "Attempting to connect to host " + host + ", port " + port); connection.connect(); output(Data.INFO, "Connection to host " + host + ", port " + port + " successful."); output(Data.INFO, "connection.isConnected() = " + connection.isConnected()); //connection.loginAnonymously(); output(Data.INFO, "Attempting to log in username " + user + ", password " + password); connection.login(user, password, "dummy"); output(Data.INFO, "Logging in username " + user + ", password " + password + " successful."); //connection.addPacketListener(new SmackMessageListener(connection, echoReply), new MessageTypeFilter(Message.Type.chat)); }

catch (Throwable t)

{ t.printStackTrace(); connection = null; }

return connection;
}

No exception is thrown when I call connect(), connection.isConnected() = true is printed but when it tries to log in, I immediately get :

java.lang.IllegalStateException: Not connected to server.

Thank you.

Show
Ginger Rivera added a comment - Do you have any sample code for logging in? I have some code where I am able to connect but not log in: public BOSHConnection login(String host, int port, String user, String password, String domain, String filepath) { BOSHConnection connection = null; try { BOSHConfiguration config = new BOSHConfiguration(false, host, port, filepath, user + "@" + domain); config.setCompressionEnabled(true); // config.setSASLAuthenticationEnabled(true); connection = new BOSHConnection(config); output(Data.INFO, "Attempting to connect to host " + host + ", port " + port); connection.connect(); output(Data.INFO, "Connection to host " + host + ", port " + port + " successful."); output(Data.INFO, "connection.isConnected() = " + connection.isConnected()); //connection.loginAnonymously(); output(Data.INFO, "Attempting to log in username " + user + ", password " + password); connection.login(user, password, "dummy"); output(Data.INFO, "Logging in username " + user + ", password " + password + " successful."); //connection.addPacketListener(new SmackMessageListener(connection, echoReply), new MessageTypeFilter(Message.Type.chat)); } catch (Throwable t) { t.printStackTrace(); connection = null; } return connection; } No exception is thrown when I call connect(), connection.isConnected() = true is printed but when it tries to log in, I immediately get : java.lang.IllegalStateException: Not connected to server. Thank you.
Hide
Guenther Niess added a comment -

You should remove "user + "@" +" from creating a new configuration since the 5th parameter is the XMPP domain of your server. I can't reproduce your issue, please can you enable debug (Connection.DEBUG_ENABLED = true;) before you call your login method and post your issue it to the forum?

Show
Guenther Niess added a comment - You should remove "user + "@" +" from creating a new configuration since the 5th parameter is the XMPP domain of your server. I can't reproduce your issue, please can you enable debug (Connection.DEBUG_ENABLED = true;) before you call your login method and post your issue it to the forum?
Hide
Mike Cumings added a comment -

For transparency/visibility, I'm having to put my work on the "jbosh" portion of this issue on hold for the time being. I do plan to continue working on it as my schedule allows but don't have any cycles to spend on this at the moment. Additional contributers to the jbosh project are welcome, should anyone be interesting in pursuing this in the interim.

Show
Mike Cumings added a comment - For transparency/visibility, I'm having to put my work on the "jbosh" portion of this issue on hold for the time being. I do plan to continue working on it as my schedule allows but don't have any cycles to spend on this at the moment. Additional contributers to the jbosh project are welcome, should anyone be interesting in pursuing this in the interim.
Hide
Nathan Mittler added a comment -

Mike/Guenther,
I'm also very interested in this feature. Do you guys have a feel for a target release?

Thanks,
Nate

Show
Nathan Mittler added a comment - Mike/Guenther, I'm also very interested in this feature. Do you guys have a feel for a target release? Thanks, Nate
Hide
Mike Cumings added a comment -

Unfortunately, I'm still too busy to get back into this at this time. The JBOSH library is currently awaiting a refactor to fix a concurrency issue (in the test framework) and to add SSL testing capabilities (also primarily in the test framework). Guenther can comment on the integration into smack as he's done all the work there.

Show
Mike Cumings added a comment - Unfortunately, I'm still too busy to get back into this at this time. The JBOSH library is currently awaiting a refactor to fix a concurrency issue (in the test framework) and to add SSL testing capabilities (also primarily in the test framework). Guenther can comment on the integration into smack as he's done all the work there.
Hide
Srinivas Chennamaraja added a comment -

Mike/Guenther,
I have some time on my hand. I would like to take a look at it and see if I can be of any help.

Show
Srinivas Chennamaraja added a comment - Mike/Guenther, I have some time on my hand. I would like to take a look at it and see if I can be of any help.
Hide
Marjan Sterjev added a comment -

Hi,

Is there any progress with this feature?
I downloaded the SVN branchL smack-bosh.
The initial tests for HTTP work well.
However HTTPS does not work. The client timeouts after some time. Debug window shows no responses.
The configuration that works well is:
BOSHConfiguration configuration=new BOSHConfiguration(false,"localhost",7070,"/http-bind/","marjan-sterjev");
The HTTPS version timeouts:
BOSHConfiguration configuration=new BOSHConfiguration(true,"localhost",7443,"/http-bind/","marjan-sterjev");

Best Regards,

Marjan

Show
Marjan Sterjev added a comment - Hi, Is there any progress with this feature? I downloaded the SVN branchL smack-bosh. The initial tests for HTTP work well. However HTTPS does not work. The client timeouts after some time. Debug window shows no responses. The configuration that works well is: BOSHConfiguration configuration=new BOSHConfiguration(false,"localhost",7070,"/http-bind/","marjan-sterjev"); The HTTPS version timeouts: BOSHConfiguration configuration=new BOSHConfiguration(true,"localhost",7443,"/http-bind/","marjan-sterjev"); Best Regards, Marjan

People

Vote (36)
Watch (23)

Dates

  • Created:
    Updated: