As WebSocket is its own protocol you will need a client side implementation to interact with the WebSocket server endpoint. See https://github.com/manorrock/jakartaee-examples/tree/master/websocket/annotatedClientEndpoint for the client endpoint example.
Posted September 7th, 2018