Doors Web (not DNG) OSLC API - How do I get the text of custom fields
![](http://jazz.net/_images/myphoto/d12e3b17f9925cdfd40d043ddface3eb.jpg)
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.
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Nov 10 '23, 4:16 a.m.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
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Nov 10 '23, 4:17 a.m.Your XML does not look like RDF+XML.
Arne Matthes
Nov 22 '23, 9:39 a.m.@rschoon Why does this not look like RDF+XML? What's missing there? That's the (slightly shortened) Data I get from Doors.
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Nov 22 '23, 10:04 a.m.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.
Arne Matthes
Nov 23 '23, 3:06 a.m.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.
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Nov 23 '23, 3:30 a.m.Kevin Murphy
Nov 27 '23, 6:09 p.m.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.