abhijith.p
(Abhijith P)
September 10, 2024, 1:29pm
1
Hi All
I am doing a POC related to wM and as part of that i have followed the steps mentioned in
Overview
The WebSocket protocol provides for simultaneous two-way communication between a client and server/endpoint over a single TCP connection. Integration Server can act as a WebSocket client endpoint and a WebSocket server endpoint.
How it works?
In a WebSocket configuration, Integration Server can act as a WebSocket server or a WebSocket client. When Integration Server acts as a WebSocket server, it hosts a server endpoint that you create using Designer. The endpoint is identified by …
which tells us about wM as server and client.
Now my requirement is how to listen to the external websocket server and when server sends the events then i need to consume them and do further processing.
I have created a sample websocket server using this link
GitHub - equinor/signalr-echo-server: SignalR dynamic echo server for testing SignalR WebSocket functionality in web clients and i am able to send the data from wM to this server but not the other way around server to wM.
Any insights on this please.
abhijith.p
(Abhijith P)
September 10, 2024, 7:22pm
2
I have figured it out.
I have run the docker instance of signal r and brought up the server.
In integration server side created a websocket client connection
ws://localhost:5000/echo
Written a service
pub.client:websocket(This service is used for connecting client to server).
pub.websocket:send(This service is used to send intial message )
hardcode the value in message as
{“protocol”:“Json”,“version”:“1”} make sure to have the control character copied from chrome.
Navigate to developer tools -->Network>ws and reload to get the above string.
In the OnText flow service you can write your own logic in my case I have called pub.flow:debugLog
From Signal R sever type the message and click on send
Then in the logger I could see message from signalR is displayed
1 Like