Doors Web (not DNG) OSLC API - How do I get the text of custom fields
Hello everyone,
we still use the old Doors Web (and also Doors Desktop 9.x) and I need to fetch all requirements via the OSLC API and convert them to JSON.
I already managed to query the requirements I need, but I just cant find a way to identify which XML attributes correspond to which custom field.
My response looks like this
<?xml version="1.0"?>
<rdf:RDF
xmlns:rm_property="<company_url>/dwa/rm/urn:rational::1-48beda447cfb0c27-M-0000f900/types/">
<oslc_rm:Requirement
rdf:about="<about url>">
<rm_property:attrDef-1049 rdf:parseType="Literal">
<div>---</div>
</rm_property:attrDef-1049>
<rm_property:attrDef-1053 rdf:datatype="http://www.w3.org/2001/XMLSchema#integer"></rm_property:attrDef-1053>
<rm_property:attrDef-1069
rdf:resource="<company_url>/dwa/rm/urn:rational::1-48beda447cfb0c27-M-0000f900/types/attrDef-1069#2"/>
<rm_property:attrDef-1067 rdf:parseType="Literal">
<div></div>
</rm_property:attrDef-1067>
<rm_property:attrDef-1006
rdf:resource="<company_url>/dwa/rm/urn:rational::1-48beda447cfb0c27-M-0000f900/types/attrDef-1006#9"/>
<rm_property:attrDef-1078
rdf:resource="<company_url>/dwa/rm/urn:rational::1-48beda447cfb0c27-M-0000f900/types/attrDef-1078#1"/>
<rm_property:attrDef-1035 rdf:parseType="Literal">
<div></div>
</rm_property:attrDef-1035>
</oslc_rm:Requirement>
</rdf:RDF>
How would I find what's the corresponding attribute in doors web and the value of that attribute.
When I query the URLs of the rm_property:attrDef-xxxx attributes, I just get a list of my requirements.
Any help is greatly appreciated.
showing 5 of 7
show 2 more comments
|
Accepted answer
Thanks for all the help I got.
In the end I found out that you can add "useEnumLabel=true" to the query and get enum labels back instead of links
Ralph Schoon selected this answer as the correct answer
|
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.
Comments
Have you looked into how OSLC works? Here is the core specification: https://docs.oasis-open-projects.org/oslc-op/core/v3.0/oslc-core.html
Headers are:
OSLC-Core-Version: 2.0
Accept: application/rdf+xml
Your XML does not look like RDF+XML.
@rschoon Why does this not look like RDF+XML? What's missing there? That's the (slightly shortened) Data I get from Doors.
I was wrong, pasted XML in this forum is usually hard to read. I was missing the prefixes, but there is a prefix. A better way might be using text/turtle.
the attributes are e,g, rm_property:attrDef-1049 and you could get more details using the rdf:resource url.
That's the strange part.
When I grab the URL from lets say rm_property:attrDef-1069 (<company_url>/dwa/rm/urn:rational::1-48beda447cfb0c27-M-0000f900/types/attrDef-1069#2) and query it using the application/rdf+xml headers I just get a long list of URLs back, which looks suspiciously like the list of all requirements instead of the enum values.
With your pastebin response, I think it's working as intended. I think you need to query each one of those responses to get your DOORS objects.