This documentation is for WSO2 Enterprise Service Bus version 5.0.0. For the latest ESB, view the latest WSO2 Enterprise Integrator documentation.

All docs This doc

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Start WSO2 ESB. For information on how to start the ESB server. see Running the Product.
  • Download the sample netty artifacts. folder
  • Open a terminal, navigate to the location where you saved the netty artifacts, and execute the following command to start the WebSocket server on port 8082:

    Code Block
    java -cp netty-example-4.0.30.Final.jar:lib/*:. io.netty.example.http.websocketx.server.WebSocketServer

...

  • Open a terminal, navigate to the location where you saved the netty artifacts, and execute the following command to start the WebSocket client:

    Code Block
    java -DsubProtocol="synapse(contentType='application/json') -DclientPort=9091 -cp netty-example-4.0.30.Final.jar:lib/*:.io.netty.example.http.websocketx.client.WebSocketClient

    You will see the message WebSocket Client connected ! on the client terminal. 


  • Send the following sample JSON payload from the client terminal:

    Code Block
    ("sample message":"test"}

...