websocketServer = "http://localhost:8080/web/getCfgRoleWS";
websocketServerURI = new URI(websocketServer);
webSocketContainer = ContainerProvider.getWebSocketContainer();
webSocketSession = webSocketContainer.connectToServer(this.getClass(), websocketServerURI);
// And after checking that the webSocketSession is not null or closed:
webSocketSession.getBasicRemote().sendText(id.toString());
Environment--
Client: JDK_1.8.0_60, Undertow 1.3.0.CR2
Server: JDK_1.8.0_60, Wildfly-10.0.0.CR2
I would welcome any hints or help that you can offer.
Cordially,
Dennis