Hi all thanks for the wonderful support. I need some help with the example code provided in this support article.
Not to clued up with nodejs inner workings and getting nowhere fast with google searches. Following the instructions we get the following error and can’t figure out why. This is probably more a javascript question.
stomp=require('stompjs');
{ VERSIONS:
{ V1_0: '1.0',
V1_1: '1.1',
V1_2: '1.2',
supportedVersions: [Function: supportedVersions] },
client: [Function: client],
over: [Function: over],
Frame:
{ [Function: Frame]
sizeOfUTF8: [Function],
unmarshall: [Function],
marshall: [Function] },
setInterval: [Function],
clearInterval: [Function],
overTCP: [Function: overTCP],
overWS: [Function: overWS] }
> stompClient = stomp.overWS('ws://localhost:7778/w/messages/websocket');
Client {
ws:
{ url: 'ws://localhost:7778/w/messages/websocket',
send: [Function: send],
close: [Function: close],
binaryType: 'arraybuffer' },
counter: 0,
connected: false,
heartbeat: { outgoing: 10000, incoming: 10000 },
maxWebSocketFrameSize: 16384,
subscriptions: {} }
> **TypeError: ws.onopen is not a function**
stompClient returns connected: false. Could this be reason for the ws.onopen error?