Project

General

Profile

Actions

Web Sockets

Now requality starts several web sockets for different editors. Current mapping is

markup editor: 9920
Requirements editor1 (unieditor): 9921
Report view (reportView): 9922;
Requirements editor2 (moduleeditor): 9923
Requirements editor1 (review, in read-only mode): 9924

Web sockets uses JSON in messages.

Common format of client-server request includes {"operation":"{op}", "location":"{loc}","session":"{sess}"}
where {op} is the name of operation(for ex. "init"), {loc} is uri like http://localhost:9807/SMiqI3pGjPql/documents/stpo::6bc8a38f-45ba-4c82-bba8-db0c74e06125//?inTool=1&port=9920&document=6bc8a38f-45ba-4c82-bba8-db0c74e06125&session=4741003328181833534x%x% {sess} is generated session identification, for ex. 4741003328181833534

Requests may also include more parameters like, for example, init uses parameter "document",
like "document":"6bc8a38f-45ba-4c82-bba8-db0c74e06125"
Each new connection to server requires first call of init operation.
As an full example may be {"operation":"init", "location":"http://localhost:9807/SMiqI3pGjPql/documents/stpo::6bc8a38f-45ba-4c82-bba8-db0c74e06125//?inTool=1&port=9920&document=6bc8a38f-45ba-4c82-bba8-db0c74e06125&session=4741003328181833534&","session":"4741003328181833534", "document":"6bc8a38f-45ba-4c82-bba8-db0c74e06125"}
or for one more editor {"operation":"init", "location":"http://localhost:9807/r4AV8F78228D/reports/stpo::33cfa331-7d99-47e3-9c4a-0455df4101b5/jetos-reqs.stpo2.html?inTool=1&port=9922&document=33cfa331-7d99-47e3-9c4a-0455df4101b5&session=8974468582254662369&","session":"8974468582254662369", "document":"33cfa331-7d99-47e3-9c4a-0455df4101b5"}

Server-client messages are mostly formed as follows: {"operation":"{op}", "data":{data}}
where op is the name of operation(for example, update of selection listed below)
and {data} is an json object storing all passed data according to operation kind
for example, {"data":{"nextId":"011","requirementId":"Requirements","requirementUUID":"4e24f8a1-22b8-40b7-b406-01acc4d89d52"},"operation":"updateSelection"}

Resources provider

Resources(and editors) are available at port 9807. URI is formed mostly according to given template:
http://{ip}:9807/{appSessId}/{editor}/{project}::{nodeUUId}/{resPath}?{params}
where ip is ip address of server(commonly localhost)
appSessId - randomly generated on app start string, can be taken from API point /resources/getApplicationSession
editor - one of set{markup,unieditor,reportView,moduleeditor,review}
project - name of project
nodeUUId - id of node where editor needs to be openned
resPath - path to resources. For documents resources(markup) were provided from corresponding document. Default path points at document xhtml file. If uri points at resource like /image.png it will be taken from corresponding resources folder of node. But if some commonly used resource like jquery is requested then it will be loaded from plugin folder jstools(used to load ckeditor and jquery and so on).
params - set of additional parameters passed to script. For example, ?inTool=1&port=9922&document=33cfa331-7d99-47e3-9c4a-0455df4101b5&session=8974468582254662369& - port is socket port, document - uuid of node and session is session identification, isTool - param used to determine if editor was started from eclipse, noScript - set to true if scripts do not need to be attached
session

As example can be URL for markup
http://localhost:9807/r4AV8F78228D/reports/stpo::33cfa331-7d99-47e3-9c4a-0455df4101b5/jetos-reqs.stpo2.html?inTool=1&port=9922&document=33cfa331-7d99-47e3-9c4a-0455df4101b5&session=8974468582254662369x%x%

Updated by Denis Kildishev over 1 year ago · 3 revisions