Consume Websocket endpoint in Webmethods

Hello Dears,
I want to consume Websocket endpoint, send message and recieve json response in same session.
below steps that i did but i don’t know how to recieve json response.

  1. created websocket endpont.
  2. connect websocket with following IS service pub.client:websocket
  3. using following IS service to send message pub.websocket:send but output of this is only sent flag “true or false” and i wand the json response.

A websocket does not work that way. Refer to How to configure WebSockets on Integration Server for a guide in setting up a websocket client on IS (I’m assuming that’s what you want given the brief info you’ve shared.)

WIth websockets, the interactions are asynchronous. Client sends a message and gets an ack. Later, the server will send a message to your callback. There is where you’ll handle a “response”.