pega 7.2 Websocket issue
I'm currently working on windows c# project for the customers who using Pega system 7.2 in weblogic server 12c. So I use websocket to build the communication between my application and pega system in SSL layer. But now I encounter an issue of using websocket in Pega System, problem is: the pega able to use this java "websocket.onopen = function ()" for first time, but it failed for second time attend like after refresh the web page, and try this function it will not work anymore. Until logoff the user account and login again, then it work for first time only. Very appreciate for everyone who give me advice and solution to solve this. Thank you very much.
This is my java script writing in Pega System:
var ws;
function openSocket() {
try {
alert("Opening Socket");
ws = new WebSocket("wss://localhost:8181/Chat");
ws.onopen = function () {
alert("Connected! Initialize device.");
};
ws.onmessage = function (event) {
alert(event.data);
};
ws.onclose = function () {
alert("Connection closed");
};
}
catch (err) {
alert("Error: " + err.message);
ws.close(1000);
}
}