Error while conneting to websocket-gateway?

You are using the HTML5 Gateway, what you need is Dragonfire to work with XMPP. Download http://kaazing.com/download#df, download the gateway that says XMPP next to it.

“Kaazing WebSocket Gateway DF (for XMPP)”