I'm able to connect my hybrid android app with Kaazing using the following lines:
var jmsConnectionFactory;
jmsConnectionFactory = new JmsConnectionFactory("ws://10.0.2.2:8888/jms");
var connectionFuture = jmsConnectionFactory.createConnection(null, null, function () {/*something is done here*/}
lines of the gateway-config.xml are:
<service>
<name>JMS Service</name>
<description>JMS Service</description>
<accept>ws://10.0.2.2:8888/jms</accept>
<type>jms</type>
<properties>
<connection.factory.name>GenericConnectionFactory</connection.factory.name>
<context.lookup.topic.format>%s</context.lookup.topic.format>
<context.lookup.queue.format>%s</context.lookup.queue.format>
<env.java.naming.factory.initial>com.tibco.tibjms.naming.TibjmsInitialContextFactory</env.java.naming.factory.initial>
<env.java.naming.provider.url>tcp://localhost:7222</env.java.naming.provider.url>
<destination.strategy>session</destination.strategy>
</properties>
<accept-options>
<ws.bind>localhost:8888</ws.bind>
</accept-options>
<realm-name>demo</realm-name>
<cross-site-constraint>
<allow-origin>*</allow-origin>
</cross-site-constraint>
This is the error
ConnectionFailedException : WebSocket connection failed"
The worst part is that it was working fine, and I was able to connect but now it is not working.
What I did was upgraded my nodejs installed cordova to upgrade it. Now I have brought back every thing but it doesn't work.