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

RQM 6.0.6.1 Unable to retrieve the Test Case title using OSLC

 Hi Folks, we have some legacy OSLC code that is unable to retrieve the Test Case Title from RQM 6.0.6.1 using OSLC called from a RTC plugin:


String tcXPath = "//ns2:testcase/ns3:identifier";
xpath.setNamespaceContext(
new NamespaceContextMap(



InputSource source = new InputSource(response.getEntity().getContent());
Element tcNode = (Element)xpath.evaluate(tcXPath, source, XPathConstants.NODE);
if (tcNode == null)
{
response.getEntity().getContent().close();
logger.warn("Could not find Test Case URL in XML for test case " + tcId);
return null;
}
Element tcParent = (Element)tcNode.getParentNode();
Element tcNameNode = (Element)tcParent.getElementsByTagName("ns3:title").item(0);
if (tcNameNode == null) {
logger.warn("Could not find Test Case Name in XML for test case " + tcId);
} else {
this.testCaseName = tcNameNode.getTextContent();
}

I think the ns3 Tag is incorrect does anyone know what the right tag might be?

0 votes


Accepted answer

Permanent link

Hi Russell,

Yes, the tag is ns4 for "http://purl.org/dc/elements/1.1/" is correct. It should work after changing the tag.

Thanks,
Monika Rajput

Russell Norlund selected this answer as the correct answer

0 votes

Comments

Thanks for the confirmation Monika 

Just to confirm the lines that need to change are:


and
getElementsByTagName("ns3:title"). to getElementsByTagName("ns4:title").

 


One other answer

Permanent link

 The tag as changed from ns3 to ns4 in 6.0.6.1

0 votes

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
× 10,936

Question asked: Dec 08 '20, 10:58 a.m.

Question was seen: 1,506 times

Last updated: Dec 09 '20, 11:58 a.m.

Confirmation Cancel Confirm