Access RTC with OSLC using Javascript
![]()
Hi,
Below article explains how to connect/authenticate RTC using Java.
I would like to know if there is a way I can convert the above given code to Javascript. Can anybody please assist me with the code.
Thank You.
Regards,
Usman
|
4 answers
![]() |
![]()
I am not a big fan of such idea. What do you want to do using OSLC within some JavaScript codes? Remember that when you are using JavaScript, you are already dealing with HTTP sessions. Do you want to open new HTTP connections for the OSLC requests? If not, you're probably looking at XHR, but I don't see the RTC JavaScript extension offers such capability (explicitly).
|
![]()
Here's some sample JavaScript code that connects to an OSLC server and gets the service provider catalog, which requires authentication. Note that the authentication challenge may occur at any time, so all requests should be prepared for the challenge.
/** * Connect to the server with the given credentials |
![]()
Hi Usman,
I worked the last 6 month with Javascript inside a Open Social Widget.
When you say Javascript do you mean:
* Inside a Browser?
* NodeJS?
I ask because there are some differences you have to think about when you use a Browser:
* CORS
* Async Requests
If you work with a Browser I would recommend Chrome because he has the perfect Dev Tools.
BTW, OSLC isn't the only possibility. Have a look at my Blog clmpractice.org.
My personal opinion is that Javascript is the future because everything runs in the Browser
(except the RTC Client) and most of the other CLM Tools has no Java SDK.
Thx
Stefan
|
Comments
Apologies for the late reply. Really overwhelmed to see all the replies.