OSLC access to DOORS classic: handle large responses
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
Thanks for the hint. I reworked my query as follows
oslc_url = 'https://<server>:<port>/dwa/rm/oslc/query/'
modreq_urn = '<urn>'
oslc_prefixes = 'doorsAttribute=<http://jazz.net/ns/rm/doors/attribute#>,' \
'rm_property=<https://<server>:<port>/dwa/rm/<urn>/types/>'
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