Getting artifacts with DNG OSLC API
Hello!
I'm trying to discover services for Rational DOORS Next Generation v6.0.5 in the same way as I was doing that for RTC/RQM. But I have failed to get needed result. I have got rootservices, catalog and services XML file for "" project without a problem.
service.xml contains next:
<?xml version="1.0" encoding="UTF-8"?><oslc_rm:ServiceDescriptor xmlns:oslc_rm="http://open-services.net/xmlns/rm/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" rdf:about="https://win2012:9443/rm/oslc_rm/_JgYSFujKEeinF9fCDHR5fg/services.xml"><oslc_rm:links><oslc_rm:LinkCreationServices><oslc_rm:validatedByLinkFactory rdf:resource="https://win2012:9443/rm/links/oslc/validatedByLinks"/><oslc_rm:implementedByLinkFactory rdf:resource="https://win2012:9443/rm/links/oslc/implementedByLinks"/></oslc_rm:LinkCreationServices></oslc_rm:links><oslc_rm:collections><oslc_rm:CollectionSelectionDialog><oslc_rm:heightHint>550px</oslc_rm:heightHint><oslc_rm:widthHint>800px</oslc_rm:widthHint><dc:title xmlns:dc="http://purl.org/dc/terms/">Collection Selection</dc:title></oslc_rm:CollectionSelectionDialog></oslc_rm:collections><oslc_rm:requirements><oslc_rm:SelectionDialog><oslc_rm:heightHint>550px</oslc_rm:heightHint><oslc_rm:widthHint>800px</oslc_rm:widthHint><dc:title xmlns:dc="http://purl.org/dc/terms/">Requirement Selection</dc:title></oslc_rm:SelectionDialog></oslc_rm:requirements><dc:description xmlns:dc="http://purl.org/dc/terms/">Service Descriptor for Project: Links Builder Sample Project</dc:description><dc:title xmlns:dc="http://purl.org/dc/terms/">Links Builder Sample Project</dc:title></oslc_rm:ServiceDescriptor>
Next, I'm trying to perform GET request for "https://win2012:9443/rm/pickers/com.ibm.rdm.web.RRCPicker?projectURL=https%3A%2F%2Fwin2012%3A9443%2Frm%2Frm-projects%2F_JgYSFujKEeinF9fCDHR5fg" with next headers:
OSLC-Core-Version: 2.0Accept: application/rdf+xml
But result is code 200 with message: "Javascript is either disabled or not available in your Browser"
I'm repeating similar way for RTC installed in the same CLM solution - it works properly so I don't have problems with connection to Jazz or REST client.
What is wrong?
Thanks!
Accepted answer
You try to request the delegated UI of a DOORS NG project by a REST client, which makes no sense. Since the usage of delegated UIs is only intended for Web-Browser-like applications.
This particular delegated UI you are requesting needs JavaScript to be shown, which seems to be not available by your client application.
Comments
I can pass discovery of services and do anything with RQM/RTC. I believe that this tells that I don't have a problem with JavaScript in my client. Or may be I'm wrong somewhere. But what is where I'm wrong?
Hi Benjamin,
I believe you are right! As expected, the problem was on my side because I didn't request services.xml correctly. It seems, I was confusing pointing wrongly headers in HTTP request. It resulted in partially returned response where only delegated UI was placed. I have returned to old CURL, and it works perfect. Resource "service.xml" contains necessary content that can be used for further work.
2 other answers
This error message ALWAYS indicates that you are not yet logged in.
You need to log in (form based). If you use a REST client, that is integrated in the client, login to the tool first. If you use a separate REST client, you need to do what is needed to log in (cookies, headers,...).
Comments
I was thinking the same first after got this problem. Originally, this all looks similar to API for RQM/RTC. I'm working with Chrome and Postman with Postman Interceptor set to ON. Currently, I have another Chrome tab that is open and where I have logon to RM. And this error is displayed even after being logon in RM.
To be sure, I have reproduced similar steps for RTC installed with RM in the same CLM package, and it works without a problem.
It must be mentioned that I can not correctly discover RM services in turn:
1. get catalog
2. get services.xml
3. get some URI to work with my project area like RQM/RTC API
I'm stumbling in 3-d step because I see the very limited number of URIs (displayed in my question) without capabilities to get list of requirements, create requirements, and so on, in the way how it's described here, for example:
It seems that all docs and workshops for RDNG Server API live independently from the system, whose API was essentially updated in last versions.
If you can read the service provide catalog, then you're credentials are OK for the server. However, it appears those credentials don't correspond to a user who is a member of the project area you are trying to access.
Comments
I'm developing some code in testing environment where I can do everything. The user is in JazzAdmins group, he's one of the administrators in the project area as well as he's a member of the project area with "Administrator" role with all permissions set on.
Does the user have a license assigned for DOORS Next Generation? If not you'll have to assign one.