Hello List:

I'm trying to use a websocket in Wildfly 10.0.0.CR2 from a Java SE client.

It's a pretty basic socket (a little more than just an echo). I'm sending a string to the WS on the server. However, the session id logged on WildFly and the session id on my Java SE Client do not match.


2015-10-06 12:31:28 INFO  com.alamon.socket.GetCfgRoleWS     - ServerSide >>> Connected to ... t9Y2a4kra35JpISc1s8F0qelNhoQ8mB7I_D3vTl4
2015-10-06 12:31:28 INFO  com.alamon.socket.GetCfgRoleWS     - ServerSide >>> got: 6 : t9Y2a4kra35JpISc1s8F0qelNhoQ8mB7I_D3vTl4
2015-10-06 12:31:29 INFO  stdout     - {"id":6,"name":"inspector","description":"inspector","enabled":true,"created":1444156117341,"modified":1444156117341}
2015-10-06 12:31:29 INFO  com.alamon.socket.GetCfgRoleWS     - ServerSide >>> Session t9Y2a4kra35JpISc1s8F0qelNhoQ8mB7I_D3vTl4 closed because of CloseReason[1000]

ClientSide >>> Session 6uT2VhsWOF8Kc5eMboHCybXQ02v1duV9MnhW8KMl closed because of CloseReason[1000]

The value I'm sending to the server (6 as a String) is showing up on the server side but I'm not getting a response back. I'm guessing because the session id's don't match. But, neither the Java SE client or the Wildfly server are throwing any errors.

The client side seems pretty straight forward:
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