It's all about the answers!

Ask a question

Odd behavior of* in OSLC query

Daniel Garcia (4911013) | asked May 19 '14, 8:18 a.m.
 Hello everyone.

I'm trying to retrieve all the information from a single workitem using OSLC. I've tried the following query in RTC 4.0.1, 4.0.5 and 4.0.6:


The result is what I expected: a RDF response containing every property of the workitem which identifier is "18552" (identifier, type, plannedFor, ...), and a property "oslc:totalCount" set to "1". Working as expected.

Now, trying the same query (with different project area and different ID, of course) in another 4.0.1 server and I just get the following result:





      xmlns:oslc="" >

      <rdf:Description rdf:about="https://<server>:<port>/jazz/oslc/contexts/_o9yuus5GSdGj867hJss_nR/workitems?oslc.where=dcterms:identifier=%2237993%22&amp;*">



            <rdf:type rdf:resource=""/>


      <rdf:Description rdf:about="https://<server>:<port>/jazz/oslc/contexts/_o9yuus5GSdGj867hJss_nR/workitems">

            <rdfs:member rdf:resource="https://<server>:<port>/jazz/resource/itemName/"/>



The server is providing a proper but incomplete response. It's like as the wildcard of the '*' parameter is being ignored. When I change the wildcard for single parameters (i.e. '"dcterms:identifier"'), the response is including it as expected, but wildcard is not working at all.

Does anyone know the reason of this odd behavior? Some server configuration parameter maybe?

Thank you very much for your help.

Donald Nong commented May 20 '14, 3:28 a.m.

Although the RDF looks to be correctly formatted, the content does not look correct (apart from the incompleteness). It seems that the work item cannot be queried. What if you GET the work item directly using OSLC?

Daniel Garcia commented May 20 '14, 3:53 a.m.

  Hello, Donald.

First of all, thank you for your answer. When I access the workitem directly through the URL, I get all the expected fields. Only when using the OSLC query, the odd behavior happens.
I've tried with different WorkItems and different filters, and alas, it's behaving in the same way I described above.

My intention is retrieving workitems using OSLC and mapping them into object once the RDF/XML file is obtained. I've borne in mind your suggestion to retrieve the information when I have the ID of the workitem, but the problem is that now I've no way to get the expected information when I need to filter by other attributes, such type or contributor.

Again, thank you very much for your help, Donald.

    Kind regards.

    Daniel G. Garcia.

Donald Nong commented May 20 '14, 11:17 p.m.

Hi Daniel,
It seems that the problem is related to something particular in the environment which we cannot identify yet. You can enable SQL query debugging in the file to see how the CCM server interprets the OSLC query in both the working and problematic environments. It can be quite time-consuming going through the log files though.
Another thing you may try, which may not be relevant at all, is to move "" to the middle of the URI so that the OSLC URI does not end with the "" sign. I once had some nasty problems with such URI, not OSLC-related though.

Daniel Garcia commented May 21 '14, 3:44 a.m.

Hello, Donald.

I agree with your theory. I've tried over RTC versions 4.0.1, 4.0.5 and 4.0.6 RTC versions which run over basic test configuration (Tomcat+Derby) and they are working properly. The problem showed itself on production and pre-production environments (CLM 4.0.1+WAS+DB2), so I guess that, if the platform is the same, the only possibilities may be related with configuration or environment issues.

I have already tried to change the order of the '*' sentence inside the query, and no luck either. I'll take into consideration your suggestion about activating sql debugging in pre-production environment and taking a look to the logs.

Again, thank you very much for your help.

Kind regards,

    Daniel G. Garcia

Sudarshan Rao commented May 21 '14, 4:07 a.m.

You could probably try*, which too should give you similar result. 

Since isn't working, I don't know if this would work; but worth a try I think. 

Daniel Garcia commented May 21 '14, 4:36 a.m.

Hi, Sudarshan,

I tried, but the result is the same as using '*'. It looks something related with the asterisk character, because specifying single fields (like dcterms:identifier) results in a proper response in conjunction with the '' parameter.

Thank you very much for the suggestion.

Kind regards,

    Daniel G. Garcia.

showing 5 of 6 show 1 more comments

Be the first one to answer this question!

Register or 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.