Confussion with different TS clients #154
Unanswered
agonzalezgaliana
asked this question in
ModelServer
Replies: 1 comment
-
Sorry for the late reply, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently testing the connection of a Theia Tree Editor with the Model Server. I've been following the Coffee Editor as example on how to do things. However, as today's state, it seems that the Coffee Editor is not using the latest version of the EMF.Cloud model server TS clients. So at this point I'm trying to figure out how to rework my code to use the Model Server client to send notifications to the Model Server and to get events via WS subscription.
My tree editor widget currently uses the following to send requests to the Model Server:
With this implementation I'm able to get the model from the server, however I cannot get any notification event coming from the Model Server (even though they are visible in postman). From what I see, the Coffee Editor uses other Model Server Client (ModelServerClient instead of TheiaModelServerClient, however ModelServerClient seems to also exist), not sure if this could be the problem. On the other side I see that the
subscribe
method accepts a second parameter to set some subscribing options and there a listener could be specified.What could be wrong with my listeners?
On the other side I'd appreciate some clarifications about the differences among @eclipse-emfcloud/modelserver-theia and @eclipse-emfcloud/modelserver-client packages and their purpose.
Many thanks in advance.
UPDATE
I've been debugging the issue and I can see that on the Model Server I get the following request when calling subscribe on the Tree Editor:
83170075 [JettyServerThreadPool-328] DEBUG org.eclipse.jetty.server.HttpConnection - HttpConnection@5ff32273::SocketChannelEndPoint@d768ad2{l=/127.0.0.1:8081,r=/127.0.0.1:61478,OPEN,fill=-,flush=-,to=0/30000}{io=0/0,kio=0,kro=1}->HttpConnection@5ff32273[p=HttpParser{s=CONTENT,0 of -1},g=HttpGenerator@6ec8baf6{s=START}]=>HttpChannelOverHttp@6c1b211d{s=HttpChannelState@55821656{s=IDLE rs=BLOCKING os=OPEN is=IDLE awp=false se=false i=true al=0},r=1,c=false/false,a=IDLE,uri=//localhost:8081/api/v1subscribe?modeluri=test.otx&_isCancelled=false,age=0} parsed true HttpParser{s=CONTENT,0 of -1}
As you can see it seems that the TS client is building the wrong URI
localhost:8081/api/v1subscribe
missing a'/'
Currently my dependencies in the package.json look like the following:
Beta Was this translation helpful? Give feedback.
All reactions