Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

1

0 votes



2 answers

Permanent link

 Try adding an oslc.prefix clause to define the doorsAttribute and rm_property namespaces.

1 vote


Permanent link

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


My headers are 
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

0 votes

Comments

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

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 516
× 198
× 10

Question asked: Sep 07 '22, 4:23 a.m.

Question was seen: 1,649 times

Last updated: Sep 16 '22, 6:37 a.m.

Confirmation Cancel Confirm