There is an example in the Undertow test suite here:
Basically there is no standard way to do this with the web socket API, instead you need to
pass in a SSLContext under the io.undertow.websocket.SSL_CONTEXT property name.
We also provide other ways to do this, you can implement
io.undertow.websockets.jsr.WebsocketClientSslProvider (and add a META-INF/services entry
for your implementation) or call
io.undertow.websockets.jsr.DefaultWebSocketClientSslProvider#setSslContext() to set a
thread local SSL context.
----- Original Message -----
From: "Steve A. Gorman"
Sent: Wednesday, 2 March, 2016 5:54:25 AM
Subject: [undertow-dev] WSS Java Client Examplt
I have a J2EE project that runs a Resource Adapter to allow some socket
communications to a CPP app, all running in Wildfly 9. I now want to write a
java socket listener that reads broadcast messages on a TCP/IP connection
and forward those broadcast message to a bunch of browser sessions. My
deployment structure is ..
JcaAdapter.rar (tcp/ip socket reader lives in here)
BusinessLogic.war ( jcaAdapter.getConnection() and receive tcp/ip messages )
Inside my BusinessLogic.war I have created a javax
@ServerEndpoint(“/broadcasts/”) websocket endpoint for the JS browser
clients. Inside my JcaAdapter.rar I have put a TCP/IP socket reader which
constantly listens for broadcast messages. When they arrive I want to have a
Java based WSS websocket client that sends the messages to the
@ServerEndpoint websocket. My Wildfly instance is SSL so my web socket java
client has to be WSS.
I have scoured the internet and safari books looking for an example client
for WSS written in Java but have found nothing.
Any help or advice is so very appreciated.
undertow-dev mailing list