wso2 / wso2/docs-apim

Create web socker API in 2.6 - problem with code example

Open
#8,961 0 comments 0 reactions 3 assignees View on GitHub

@shaniR is already working on this.

Since Feb 9, 2020.

Priority/Normal Type/Docs
Dominant language
CSS
Stars
99
Forks
708
Avg merge
1d 7h
Merged PRs (30d)
22

Description

Description:

On following documentation
https://docs.wso2.com/display/AM260/Create+a+WebSocket+API
there is a problem with Netty-based WebSocket client that is downloadable in step 11.

In code, in following WebSocketClient.java file on line 93 Keystore location is hardcoded.
String carbonKeyStoreLocation = "/home/isuru/wso2/support/NMDPSUB-9/wso2am-2.1.0/repository/resources"
+ "/security/wso2carbon.jks";

Documentation not covering that you need to change the path which leads to error when you trying to build it and run it

Exception in thread "main" java.io.FileNotFoundException: /home/isuru/wso2/support/NMDPSUB-9/wso2am-2.1.0/repository/resources/security/wso2carbon.jks (No such file or directory)
at java.io.FileInputStream.open0(Native Method)

Steps to reproduce:
Content Positioning in Documentation:

https://docs.wso2.com/display/AM260/Create+a+WebSocket+API


We need to change documentation or change the code to refer to the key store location differently.

NOTE:

I test the same topic for version 3.0 mention on https://apim.docs.wso2.com/en/latest/Learn/Tutorials/create-and-publish-websocket-api/
in step 4
npm install -g wscat

Installation and Invoke have worked without any errors.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.