Trading Networks 10.7 | Administering and Monitoring B2B Transactions | Service Development Help | Working with WebSocket Endpoints | Creating a WebSocket Client Endpoint
 
Creating a WebSocket Client Endpoint
A WebSocket client endpoint is designed to capture information related to connection and the respective callback services thereof. It can connect to the server endpoint identified by a URI. In a WebSocket application, WebSocket clients open a new connection to the server hosting the WebSocket endpoint, using the ws:// or wss:// protocol prefix.
*To create a WebSocket client endpoint
1. In the Service Development perspective of Designer, select File > New > WebSocket Endpoint.
2. In the Create a WebSocket Endpoint Descriptor dialog box, select the folder in which you want to save the WebSocket endpoint descriptor.
3. In the Element name field, type a name for the WebSocket endpoint using any combination of letters, numbers, and the underscore character. For more information about restricted characters, see Guidelines for Naming Elements.
4. On the Select the Endpoint Type panel, select Client. Then specify the client endpoint address.
5. Click Finish.
Designer creates the WebSocket client endpoint and saves it to the specified folder. Designer also creates associated callback services and place them in the same folder .
Following events are established on the WebSocket client side:
*A WebSocket client endpoint is established.
*The client initiates the connection to the server using the built-in service.
*The client endpoint's corresponding callback services are invoked during the life cycle of the WebSocket.
*The client communicates with the server using the built-in service .
*The client can disconnect the WebSocket connection using the built-in service.