BoshConnection with Openfire3.7.1

Hi Support,

I am using Openfire 3.7.1 and Smack3.2.1 versions.

a) Using regular XMPP Connection I am able to connect with Openfire XMPP server.

ConnectionConfiguration config = new ConnectionConfiguration(“myipaddress”, 5222, “myservicename”);
XMPPConnection connection = new XMPPConnection(config);

b) But when I am using BOSHConnection not able to connect with Openfire XMPP Server.

BOSHConfiguration config = new BOSHConfiguration(false,“myipaddress”,7070,"/http-bind", “myservicename”);
BOSHConnection connection = new BOSHConnection(config);

Error Message in java console:

Exception in thread “BOSHClient[10542297]: Receive thread” java.lang.NullPointerException
at com.kenai.jbosh.XLightWebResponse.awaitResponse(XLightWebResponse.java:187)
at com.kenai.jbosh.XLightWebResponse.getBody(XLightWebResponse.java:166)
at com.kenai.jbosh.BOSHClient.processExchange(BOSHClient.java:1031)
at com.kenai.jbosh.BOSHClient.processMessages(BOSHClient.java:976)
at com.kenai.jbosh.BOSHClient.access$000(BOSHClient.java:97)
at com.kenai.jbosh.BOSHClient$1.run(BOSHClient.java:215)
at java.lang.Thread.run(Unknown Source)

Please let me know how to resolve this error.

Thanks

Hi Support,

I am using bosh-0.6.0.jar which is the Java implementation of XMPP.org’s XEP-0124 “Bidirectional-streams Over Synchronous HTTP (BOSH)” specification from kenai.com and i am getting the above mentioned error by using this jar.

  • Would like to know does Openfire3.7.1 support BOSH. If yes then can someone please provide sample working code and It would be more helpful for me.

Thanks,