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(

at com.kenai.jbosh.XLightWebResponse.getBody(

at com.kenai.jbosh.BOSHClient.processExchange(

at com.kenai.jbosh.BOSHClient.processMessages(

at com.kenai.jbosh.BOSHClient.access$000(

at com.kenai.jbosh.BOSHClient$

at Source)

Please let me know how to resolve this error.It would be more helpful if i have some sample code for BOSH Connection