Attribute Value URI can't be resolved

I’m trying to read out Requirements from DOORS over DWA via OLSC using LYO.

While reading out a requirement using:

		ClientResponse requirementResponse = oslcOauthClient
			.getResource(requirementURL, OslcMediaType.APPLICATION_RDF_XML);
		Requirement requirement = requirementResponse.getEntity(Requirement.class);

…I get a requirement object that among many more easily parseable attributes also has some with URIs, such as this one (in contrast to an easier parseable value):

 │├QName key = {http://localhost:8080/dwa/rm/urn:rational::1-5efc6f9a4ff877cf-M-00000100/types/}attrDef-1003
 │└XMLLiteral value = <div>This is the Additional Info Value</div>
  ├QName key = {http://localhost:8080/dwa/rm/urn:rational::1-5efc6f9a4ff877cf-M-00000100/types/}attrDef-1025
  └URI value = http://localhost:8080/dwa/rm/urn:rational::1-5efc6f9a4ff877cf-M-00000100/types/attrDef-1025#1

The main question is: How do I resolve the URI that is returned here (localhost:8080/dwa/rm/urn:rational::1-5efc6f9a4ff877cf-M-00000100/types/attrDef-1025#1) into an actual value?

Intuitively, I tried oslcOauthClient.getResource(http://localhost:8080/dwa/rm/urn:rational::1-5efc6f9a4ff877cf-M-00000100/types/attrDef-1025#1, OslcMediaType.APPLICATION_RDF_XML); . However, that just returned the Formal Module in its XML Form.

Or simply put, these two requests return effectively the same response:

  • oslcOauthClient.getResource(http://localhost:8080/dwa/rm/urn:rational::1-5efc6f9a4ff877cf-M-00000100)
  • oslcOauthClient.getResource(http://localhost:8080/dwa/rm/urn:rational::1-5efc6f9a4ff877cf-M-00000100/types/attrDef-1025#1)

By pasting these URLs into a browser, I was able to confirm that this appears to be a redirection issue in DWA, where localhost:8080/dwa/rm/urn:rational::1-5efc6f9a4ff877cf-M-00000100/types/attrDef-1025#1 for some reason is automatically redirected to localhost:8080/dwa/rm/urn:rational::1-5efc6f9a4ff877cf-M-00000100.

So, what can I do about this? All that I know is that I have the URI localhost:8080/dwa/rm/urn:rational::1-5efc6f9a4ff877cf-M-00000100/types/attrDef-1025#1, and I want to know the value it contains. But for some reason that value is not accessible.

Am I using the wrong function in LYO? Or is does the problem lie somewhere else?


I assume http://localhost:8080/dwa/rm/urn:rational::1-5efc6f9a4ff877cf-M-00000100 the URI for the requirement you are trying to read. right?

Since a request to http://localhost:8080/dwa/rm/urn:rational::1-5efc6f9a4ff877cf-M-00000100/types/attrDef-1025#1 seems to redirect to the requirement (even from a browser), my guess is that this is not a URI Doors wants you to deference to get any more information from.
Client (Lyo or otherwise) cannot do anything about it, since it is for the server to decide.

But are you missing any particular information that ought to be in that URI?

Do you know otherwise what “extended properties” are? it is whatever RDF statements LyoClient receives from the server that are not explicitly handled by the Requirement Java class.

Yes, that’s pretty much the image I’ve gotten out of my own investigations thus far…

Still, it seems strange, doesn’t it? That DWA would not allow it. I mean, after all, it provides this URI, and by common convention, a URI provided by a service should point to a resource that resolves to something, should it not? I have also seen URIs that point to users in a similar fashion, though I haven’t tried to resolve these yet.

What I’m effectively trying to do is to read and write to and from DOORS programmatically. Specifically, to read something out from one DOORS instance and write it to another. Right now, I’m still a long way from that. Instead, I have imported a ReqIF file into DOORS, and am now trying to read out the values from it. Since I know which values were in the original ReqIF File, I know which values to expect.

The Extended Properties contain the contents of the <ATTRIBUTE-VALUE-*> tags of a <SPEC-OBJECT> (which in DOORS becomes a Requirement). In DOORS itself, these can be checked by right-clicking on a Requirement, selecting Properties and then going to the Attributes Tag. In DWA… I have no idea where to access them. However, using OSLC and LYO, I can still get them out in the form of extended attributes.

Since this is kinda abstract, lets trace a few choice values from start to finish.

Attribute ReqIF DOORS DWA Export result
Additional Info (XHTML) Additional Info Value Additional Info Value ? Additional Info Value
Created On (Date) 2014-12-09T00:00:00 (Foreign Created On) Tuesday, Dec 9th 2014 ? 2014-12-09T00:00
Verification State (Enumeration) _9a166d3b-a1b2-4ec8-bee6-95038e02940f (Points to “not verified”) not verified ? localhost:8080/dwa/rm/urn:rational::1-5efc6f9a4ff877cf-M-00000100/types/attrDef-1025#1

So the point is, with the exception of the Enums, I am already able to go full circle with all the Attribute Values. But with the Enums, I am missing the decisive final step that lets me determine which Enum Value the link points to.

I’ve already tried this over the resource shape too, but that only returns me something along the lines of:



So, I can even read out the exact number of allowable values for an Enum, but I have not yet figured out a way to resolve these Enums to actual values.

Is there any way to do that?

For reference, here is how the Enum definition for this particular Enum looks in the original ReqIF File:

					<DATATYPE-DEFINITION-ENUMERATION IDENTIFIER="_23909209-d1eb-4683-b7f4-3938b876e1b8" LAST-CHANGE="1970-01-01T00:00:00" LONG-NAME="T_VerificationState">
							<ENUM-VALUE IDENTIFIER="_9a166d3b-a1b2-4ec8-bee6-95038e02940f" LAST-CHANGE="1970-01-01T00:00:00" LONG-NAME="not verified">
							<ENUM-VALUE IDENTIFIER="_b463d678-8b6f-4694-b791-dda0cc485e3b" LAST-CHANGE="1970-01-01T00:00:00" LONG-NAME="passed">
							<ENUM-VALUE IDENTIFIER="_74c23957-0275-4fcc-aee7-e777d4d1dcb4" LAST-CHANGE="1970-01-01T00:00:00" LONG-NAME="failed">

And here’s how this gets translated into the Resource Shape that I get via OSLC LYO:

URI key = http://localhost:8080/dwa/rm/urn:rational::1-5efc6f9a4ff877cf-M-000000a0/types/attrDef-1025
Property value = org.eclipse.lyo.oslc4j.core.model.Property@10f19647
├about = null
├allowedValuesRef = null
├description = null
├HashMap<K,V> extendedProperties = {{}allowedValue=[http://localhost:8080/dwa/rm/urn:rational::1-5efc6f9a4ff877cf-M-000000a0/types/attrDef-1025#3, http://localhost:8080/dwa/rm/urn:rational::1-5efc6f9a4ff877cf-M-000000a0/types/attrDef-1025#1, http://localhost:8080/dwa/rm/urn:rational::1-5efc6f9a4ff877cf-M-000000a0/types/attrDef-1025#2]}
│└HashMap$Node<K,V> [0] {}allowedValue=[http://localhost:8080/dwa/rm/urn:rational::1-5efc6f9a4ff877cf-M-000000a0/types/attrDef-1025#3, http://localhost:8080/dwa/rm/urn:rational::1-5efc6f9a4ff877cf-M-000000a0/types/attrDef-1025#1, http://localhost:8080/dwa/rm/urn:rational::1-5efc6f9a4ff877cf-M-000000a0/types/attrDef-1025#2]
│ ├QName key = {}allowedValue
│ └ArrayList<E> value = [http://localhost:8080/dwa/rm/urn:rational::1-5efc6f9a4ff877cf-M-000000a0/types/attrDef-1025#3, http://localhost:8080/dwa/rm/urn:rational::1-5efc6f9a4ff877cf-M-000000a0/types/attrDef-1025#1, http://localhost:8080/dwa/rm/urn:rational::1-5efc6f9a4ff877cf-M-000000a0/types/attrDef-1025#2]
│  ├URI [0] = http://localhost:8080/dwa/rm/urn:rational::1-5efc6f9a4ff877cf-M-000000a0/types/attrDef-1025#3
│  ├URI [1] = http://localhost:8080/dwa/rm/urn:rational::1-5efc6f9a4ff877cf-M-000000a0/types/attrDef-1025#1
│  └URI [2] = http://localhost:8080/dwa/rm/urn:rational::1-5efc6f9a4ff877cf-M-000000a0/types/attrDef-1025#2
├hidden = null
├maxSize = null
├memberProperty = null
├String name = "attrDef-1025"
├Occurs occurs =
├URI propertyDefinition = http://localhost:8080/dwa/rm/urn:rational::1-5efc6f9a4ff877cf-M-000000a0/types/attrDef-1025
├ArrayList<E> range = []
├Boolean readOnly = false
├representation = null
├String title = "VerificationState"
├ArrayList<E> types = []
│└URI [0] =
├valueShape= null
└ValueType valueType =

I have by now found by request-tracing this in DWA, that DWA gets the value of the Enum using the following request:

POST http://localhost:8080/dwa/json/doors/node/getAttributes

…with a number of values in the request body that I’m not sure where they come from.

Bottom line, however, is, that this request returns something that I can work with, namely a .json with all the attribute definitions, including:

							"label":"not verified",

However, the problem is that the site does not seem to accept the request when coming from the outside due to CSRF protection. That is, even if I send the very same request with all the same parameters via RESTED, I get the following response:

HTTP Status 400 – Bad Request

Type Status Report

Message The CSRF token is invalid: The CSRF token is null.

Description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).

I have also tried calling this URI via getResource, like this:

Map<String, String> requestHeaders = new HashMap<String, String>();
requestHeaders.put("viewGuid", "AB:5efc6f9a4ff877cf:1a:1a00000000:2100000060");
requestHeaders.put("dwaUser", "kira_resari");
requestHeaders.put("DWA_TOKEN", "49b8cb0a-13d1-40c1-a3ec-dc44607b8a1e");
ClientResponse getAttributesResponse = oslcOauthClient.getResource("http://localhost:8080/dwa/json/doors/node/getAttributes", requestHeaders);

…however, instead of the desired .json file with the Attribute Definitions, this only returns me an html file that seems to depict the login screen.

 Licensed Materials - Property of IBM - some unique copyrights (i.e., the ability to copy,  modify, 
 distribute) may be licensed in certain circumstances (e.g., sample/template code  intended to be used by 
 customers to build upon and distribute as their own products).

 %full_filespec:welcome.jsp~65:ascii:VBS#1 %

 (c) Copyright IBM Corporation 2007, 2018. All Rights Reserved.


<!-- WELCOME -->

<html lang="">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="shortcut icon" href="images/rdoors.ico">
<title>Login to IBM Engineering Requirements Management DOORS Web Access</title>
<link href="../festival/caf/theme/allCafThemeCSS.css" rel="stylesheet" />
<link href="../festival/caf/allCafMainCSS.css" rel="stylesheet" />
<link href="../festival/css/allCSS.css" rel="stylesheet"></link>
<link href="style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="../tk/dojo/resources/dojo.css" />
/* Increase font size for languages whose text is difficult to see when rendered at the default text sizes */


   var dojoConfig = {
       locale: "",
       packages :[{name:"festival",location:"/dwa/festival"},
<script type="text/javascript" src="/dwa/tk/dojo/dojo.js"></script>
<script type="text/javascript" src="/dwa/tk/dijit/dijit.js"></script>

   function getAuthenticationType()
       // This function provides the authentication type when a request contains an error.
       // Do not change the function name, it must must match the function name invoked via DoorsServer.js.
       var authenticationType="USERNAME_PASSWORD";

       return authenticationType;
   function aboutBox()
       festival.dialog.launcher.showAboutDialog("About DOORS Web Access", "../about.jsp");
   function htmlHelp()
       var htmlHelpWindow ='../../dwa-help/index.jsp','_blank');
       setTimeout(function(){htmlHelpWindow.focus();}, 500);
   function visitWebsite()
       var visitWebsiteWindow ='','_blank');
       setTimeout(function(){visitWebsiteWindow.focus();}, 500);
   function visitSupport()
       var visitSupportWindow ='','_blank');
       setTimeout(function(){visitSupportWindow.focus();}, 500);
   function visitTraining()
       var visitTrainingWindow ='','_blank');
       setTimeout(function(){visitTrainingWindow.focus();}, 500);

   var initialHeight;
   function panelLayout() {
       //maintains the central positioning of the login panel.
      var PANEL_HEIGHT = 384;
      var PANEL_WIDTH = 570
      var BANNER_HEIGHT = 65;
      var PANEL_ADJUST = 20; 

      var viewport = dijit.getViewport();

      var viewportHeight = viewport.h;
      var viewportWidth = viewport.w;

      var panelNode = dojo.byId("loginFormWrapper"); 
      var marginBox = dojo.marginBox(panelNode);

      var newPanelTop = 0;

      if (PANEL_HEIGHT >= (viewportHeight - BANNER_HEIGHT)) {
          //panel height is greater than available space. 
      } else {
          //panel height is less than available space, centre vertically. 
          var halfViewPort = (viewportHeight - BANNER_HEIGHT) /2; 
          var halfPanel = PANEL_HEIGHT /2;
          var newPanelTop =  (halfViewPort - halfPanel) - PANEL_ADJUST; 

      if (PANEL_WIDTH >= viewportWidth) {
          // panel is wider than available space.
      } else {
          var halfViewWidth = viewportWidth / 2;
          var halfPanelWidth = PANEL_WIDTH / 2;
          var newPanelSide = halfViewWidth - halfPanelWidth;

      var updatedMarginBox = dojo.marginBox(panelNode,{
                                            t: newPanelTop, l: newPanelSide, h: marginBox.h, w: marginBox.w

   function onPageLoad()
       //set initial text box focus. 

       dojo.connect(window, "onresize", function(e){
                    //adjust the positioning of the central panel
                    //as the user resizes the browser. 

<body class="loginbody telelogic" onLoad="javascript:onPageLoad()">
	<div style="height: 65px"></div>
	<div id="loginFormWrapper" class="welcome login-form-wrapper">
		<form name="loginform" method="POST"
			action="../j_acegi_security_check" method="POST" autocomplete="off">
			<table border="0" cellpadding="0" cellspacing="0"
				class="doublehomebox formbox" style="margin-top: 40px">
							<td class="imagebox" align="center"></td>
									DOORS ERS Repository

									<label> Username : </label> <br> <input
										type="text" style="width: 200px" name="j_username"
										tabindex="1" />
											<label> Password : </label>
											<input type="password" style="width: 200px" name="j_password"
												tabindex="2" />
								<table width="100%">
										<td><button name="loginButton"
											<div class="homeboxsubopen">
													<a href="change_password.jsp"
														title="Change Password">
														Change Password </a>
								</table>  <input type="hidden"
								value="urn:rational:ers-5efc6f9a4ff877cf:" />
							<td colspan="2" class="homeboxdescription errormessage">   </td>
		<div class="login-footer">
			<div class="copyright-containment">
				<span class="copyright"> Licensed Materials - Property of IBM Corp. © Copyright IBM Corporation 2007, 2020. All Rights Reserved. IBM, the IBM logo,, Rational, DOORS and DOORS Web Access are trademarks or registered trademarks of International Business Machines Corporation in many countries worldwide. Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates. <!--
 Licensed Materials - Property of IBM - some unique copyrights (i.e., the ability to copy,  modify, 
 distribute) may be licensed in certain circumstances (e.g., sample/template code  intended to be used by 
 customers to build upon and distribute as their own products).

 %full_filespec:build_version.jsp~3:ascii:VBS#1 %

 (c) Copyright IBM Corporation 2009. All Rights Reserved.

 U.S. Government Users Restricted Rights: Use, duplication or disclosure restricted by GSA ADP 
 Schedule Contract with IBM Corp.

Version (Build 97235) </span>
			<img src="/dwa/images/IBM-logo.gif"
				style="margin-left: 5px; margin-bottom: 8px" />
	<!-- centeredPanel -->

So, that’s where I stand right now. I know that internally, DWA successfully uses POST http://localhost:8080/dwa/json/doors/node/getAttributes with a certain set of properties to get the attribute Definitions, which also include the sought-after Enum value. However I can neither seem to use this request from the outside, nor in LYO, and I also don’t know how to construct the properties properly.

Any ideas or insights on whether this approach is promising or impossible?