Discussion

1296
Views
JamesT43 Member since 2016 1 post
Dermalog
Posted: 4 years ago
Last activity: 4 years 4 months ago
Closed

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);
                }

            }

Data Integration Java and Activities
Moderation Team has archived post
Share this page LinkedIn