BOSHConnection with Openfire3.7.1

Hi Developers,

I am using bosh-0.6.0.jar, 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.It would be more helpful if i have some sample code for BOSH Connection

Thanks