My job is to implement a secure WebSocket connection. The first thing I wanted to do is to implement a WebSocket connection but according to the DataMiner Development Library (Section 4.7.2 Implementing a WebSocket), a Connection tag must be included inside the Protocol.Connections tag. The problem with this is that when adding the Protocol.Connections tag, it seems like DIS no longer supports this tag because it does not give me the option to add the tag.
Is there another way to implement this and can you show me an example?
Or Is there a workaround?
Please and thank you!
Hi Miguel,
The syntax described in the DataMiner Development Library is correct, it is just that DIS currently does not contain the schema definition for it and as such it will appear as if it is not supported in Visual Studio
You can see an example of how it looks like in the screenshot bellow
Do note that the first connection is a regular HTTP connection and the second is a WebSocket one
Hi Miguel,
When I implemented a similar webSocket connection to yours I used a WebsocketHandshake Http Get Request with the KeepAlive option.
Using your URL, the path used in my Http Get Request would be “/smm” while the “wss://137.237.176.76” would be the “IP Address/host” specified in the Element creation for the webSocket Connection.
Hi Miguel Garrido,
Thank you very much for showing me your whole implementation of the driver you worked on. The connection is now working, the issue was on the url attribute of the HTTP.Session.Connection.Request for the custom handshake. I had value “/smm” and when I changed that to an integer value “89”, which is the PID of a string parameter holding DefaultValue “/smm” then it was able to open the connection.
Hi Joao, I have a follow-up question.
Your answer was very helpful, However, I cannot get the connection to open. I can see that there is some information exchange on Wireshark but the status of the WebSocket Status is shown as “Closed”.
The connection is using WSS (secure websocket protocol) so I can’t identify anything on Wireshark, URL is “wss://137.237.176.76/smm”.
Is there a way to debug this to find out what might be going wrong, or is there a way to see what DataMiner is sending and what is receiving?