OSLC access to DOORS classic: handle large responses
Fabian Busch (11●2)
| asked Sep 07 '22, 4:23 a.m.
edited Sep 08 '22, 7:16 p.m. by Ian Barnard (2.3k●7●14) Hi,
I'm trying to access DOORS classic via OSLC with a Python script. When I query a specific doorsAttribute:absoluteNumber as follows
'https://<server>:<port>/dwa/rm/oslc/query/<urn>?oslc.select=doorsAttribute:absoluteNumber&oslc.where=doorsAttribute:absoluteNumber=28332'
I get an response, but if I query something like
'https://<server>:<port>/dwa/rm/oslc/query/<urn>?oslc.select=doorsAttribute:absoluteNumber&oslc.where=rm_property:attrDef-1302%3D%22RBT%22&useEnumLabel=true'
The response seems to never finish. At least not in an acceptable time. Even 1 hour would be ok as it's for an automated job. I tried to use paging, but after some research I read that it is not implemented at least in V9.5.
The module I'm querying is not small with over 14.500 objects. Doors Web Access is Version 9.7.2.3 (Build 97478), DOORS Server version is 9.7.2.1.
I also tried it with Chrom Extension "Advanced Rest Client" with the same result.
Hopefully you can help.
Regards
Fabian
|
2 answers
Try adding an oslc.prefix clause to define the doorsAttribute and rm_property namespaces. |
Thanks for the hint. I reworked my query as follows
oslcSelectQuery = oslc_url + modreq_urn + \
'?oslc.prefix=' + urllib.parse.quote(oslc_prefixes, safe='/,') + \
'&oslc.select=' + urllib.parse.quote('doorsAttribute:absoluteNumber', safe='/') + \
'&oslc.where=' + urllib.parse.quote('rm_property:attrDef-1302="RBT"', safe='/') + \
'&useEnumLabel=true'
resulting in the following url encoded request url
'https://<server>:<port>/dwa/rm/oslc/query/<urn>?https://<server>:<port>/dwa/rm/oslc/query/<urn>?oslc.prefix=doorsAttribute%3D%3Chttp%3A//jazz.net/ns/rm/doors/attribute%23%3E%2Crm_property%3D%3Chttps%3A//%3Cserver%3E%3A%3Cport%3E/dwa/rm/%3Curn%3E/types/%3E&oslc.select=doorsAttribute%3AabsoluteNumber&oslc.where=rm_property%3AattrDef-1302%3D%22RBT%22&useEnumLabel=true
headers = {'accept': 'application/rdf+xml', 'OSLC-Core-Version': '2.0'} But no change in behaviour, I'm waiting ages without even getting an http error code. Also, I think I'm defining the oslc.where part wrong, as attrDef-1302 is an enum attribute with specific allowed values, e. g. oslc:defaultValue rdf:resource="https://<server>:<port>/dwa/rm/<urn>/types/attrDef-1302#13 oslc:allowedValue rdf:resource="https://<server>:<port>/dwa/rm/<urn>/types/attrDef-1302#12 Comments
Fabian Busch
commented Sep 16 '22, 6:37 a.m.
Just for the record, the behaviour is the same when just querying
'&oslc.where=' + urllib.parse.quote('doorsAttribute:absoluteNumber<"24554"
with enough absoluteNumbers in range
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.