<div dir="ltr"><div><div><div><div><span style="color:rgb(0,0,0)"><span style="background-color:rgb(255,255,255)"><span style="font-family:arial,helvetica,sans-serif"><font size="2">Hello List:<br><br></font></span></span></span></div><span style="color:rgb(0,0,0)"><span style="background-color:rgb(255,255,255)"><span style="font-family:arial,helvetica,sans-serif"><font size="2">I&#39;m trying to use a websocket in Wildfly 10.0.0.CR2 from a Java SE client.<br><br></font></span></span></span></div><span style="color:rgb(0,0,0)"><span style="background-color:rgb(255,255,255)"><span style="font-family:arial,helvetica,sans-serif"><font size="2">It&#39;s a pretty basic socket (a little more than just an echo). I&#39;m sending a string to the WS on the server. <u>However, the session id logged on WildFly and the session id on my Java SE Client do not match</u>.<br><br><br>2015-10-06 12:31:28 INFO  com.alamon.socket.GetCfgRoleWS     - ServerSide &gt;&gt;&gt; Connected to ... <font size="4"><b>t9Y2a4kra35JpISc1s8F0qelNhoQ8mB7I_D3vTl4</b></font><br>2015-10-06 12:31:28 INFO  com.alamon.socket.GetCfgRoleWS     - ServerSide &gt;&gt;&gt; <font size="4"><b>got: 6</b></font> : t9Y2a4kra35JpISc1s8F0qelNhoQ8mB7I_D3vTl4<br>2015-10-06 12:31:29 INFO  stdout     - {&quot;id&quot;:6,&quot;name&quot;:&quot;inspector&quot;,&quot;description&quot;:&quot;inspector&quot;,&quot;enabled&quot;:true,&quot;created&quot;:1444156117341,&quot;modified&quot;:1444156117341}<br>2015-10-06 12:31:29 INFO  com.alamon.socket.GetCfgRoleWS     - ServerSide &gt;&gt;&gt; Session t9Y2a4kra35JpISc1s8F0qelNhoQ8mB7I_D3vTl4 closed because of CloseReason[1000]<br><br>ClientSide &gt;&gt;&gt; Session <font size="4"><b>6uT2VhsWOF8Kc5eMboHCybXQ02v1duV9MnhW8KMl</b></font> closed because of CloseReason[1000]<br><br></font></span></span></span></div><span style="color:rgb(0,0,0)"><span style="background-color:rgb(255,255,255)"><span style="font-family:arial,helvetica,sans-serif"><font size="2">The value I&#39;m sending to the server (6 as a String) is showing up on the server side but I&#39;m not getting a response back. I&#39;m guessing because the session id&#39;s don&#39;t match. But, neither the Java SE client or the Wildfly server are throwing any errors.<br><br></font></span></span></span></div><span style="color:rgb(0,0,0)"><span style="background-color:rgb(255,255,255)"><span style="font-family:arial,helvetica,sans-serif"><font size="2">The client side seems pretty straight forward:</font></span></span></span><br><div><span style="color:rgb(0,0,0)"><span style="background-color:rgb(255,255,255)"><span style="font-family:arial,helvetica,sans-serif"><font size="2"></font></span></span></span><pre style="background-color:rgb(255,255,255);color:rgb(0,0,0);font-family:&quot;DejaVu Sans Mono&quot;;font-size:12.1pt"><span style="color:rgb(0,0,0)"><span style="background-color:rgb(255,255,255)"><span style="font-family:arial,helvetica,sans-serif"><font size="2">websocketServer = &quot;<a href="http://localhost:8080/web/getCfgRoleWS">http://localhost:8080/web/getCfgRoleWS</a>&quot;;<br>websocketServerURI = new URI(websocketServer);<br>webSocketContainer = ContainerProvider.getWebSocketContainer();<br>webSocketSession = webSocketContainer.connectToServer(this.getClass(), websocketServerURI);<br></font></span></span></span><span style="background-color:rgb(255,255,255)"><span style="font-family:arial,helvetica,sans-serif"><font size="2">// And after checking that the webSocketSession is not null or closed:<br>webSocketSession.getBasicRemote().sendText(id.toString());<br><br></font></span></span></pre><pre style="background-color:rgb(255,255,255);color:rgb(0,0,0);font-family:&quot;DejaVu Sans Mono&quot;;font-size:12.1pt"><span style="background-color:rgb(255,255,255)"><span style="font-family:arial,helvetica,sans-serif"><font size="2">Environment--<br>Client: JDK_1.8.0_60, Undertow 1.3.0.CR2<br>Server: JDK_1.8.0_60, Wildfly-10.0.0.CR2<br><br></font></span></span></pre><pre style="background-color:rgb(255,255,255);color:rgb(0,0,0);font-family:&quot;DejaVu Sans Mono&quot;;font-size:12.1pt"><span style="background-color:rgb(255,255,255)"><span style="font-family:arial,helvetica,sans-serif"><font size="2">I would welcome any hints or help that you can offer.<br><br></font></span></span></pre><pre style="background-color:rgb(255,255,255);color:rgb(0,0,0);font-family:&quot;DejaVu Sans Mono&quot;;font-size:12.1pt"><span style="background-color:rgb(255,255,255)"><span style="font-family:arial,helvetica,sans-serif"><font size="2">Cordially,<br>Dennis</font><br></span></span></pre><pre style="background-color:rgb(255,255,255);color:rgb(0,0,0);font-family:&quot;DejaVu Sans Mono&quot;;font-size:12.1pt"><span style="background-color:rgb(255,255,255)"><span style="font-family:arial,helvetica,sans-serif"><font size="2"><br><br></font></span></span></pre><pre style="background-color:rgb(255,255,255);color:rgb(0,0,0);font-family:&quot;DejaVu Sans Mono&quot;;font-size:12.1pt"><br><br></pre><pre style="background-color:rgb(255,255,255);color:rgb(0,0,0);font-family:&quot;DejaVu Sans Mono&quot;;font-size:12.1pt"><br></pre><br><div><br><br></div></div></div>