OSLC RM Query by title doesn't return result after updating a requirement

I'm using version 4.0.1 of JTS / RRC.
Using the Example 04 from the OSLC Workshop:
PUT https://localhost:9444/rm/resources/_b5FNdF6yEeOXYZKyXGYZMg
Accept=application/xml Content-Type=application/xml OSLC-Core-Version=2.0 If-Match="_b5F0gl6yEeOXYZKyXGYZMg"
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:acp="http://jazz.net/ns/acp#" xmlns:calm="http://jazz.net/xmlns/prod/jazz/calm/1.0/" xmlns:dc="http://purl.org/dc/terms/" xmlns:jazz_rm="http://jazz.net/ns/rm#" xmlns:nav="http://jazz.net/ns/rm/navigation#" xmlns:oslc="http://open-services.net/ns/core#" xmlns:oslc_rm="http://open-services.net/ns/rm#" xmlns:public_rm_10="http://www.ibm.com/xmlns/rm/public/1.0/" xmlns:rm="http://www.ibm.com/xmlns/rdm/rdf/" xmlns:rm_property="https://localhost:9444/rm/types/"> <oslc_rm:Requirement rdf:about="https://localhost:9444/rm/resources/_b5FNdF6yEeOXYZKyXGYZMg"> <rdf:type rdf:resource="http://jazz.net/ns/rm#Text"/> <dc:contributor rdf:resource="https://localhost:9444/jts/users/aquiles"/> <dc:description rdf:parseType="Literal">This is a test document</dc:description> <dc:created rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2013-12-06T20:10:22.024Z</dc:created> <acp:accessControl rdf:resource="https://localhost:9444/rm/accessControl/_L_AhyVwSEeOl7MusTa-26Q"/> <dc:title rdf:parseType="Literal">MyDocument</dc:title> <rm_property:_NBmAIVwSEeOl7MusTa-26Q rdf:resource="https://localhost:9444/rm/types/_M7ibcVwSEeOl7MusTa-26Q#Text"/> <nav:parent rdf:resource="https://localhost:9444/rm/folders/_b14vg16yEeOXYZKyXGYZMg"/> <dc:modified rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2013-12-06T20:10:22.024Z</dc:modified> <oslc:instanceShape rdf:resource="https://localhost:9444/rm/types/_NnzEgVwSEeOl7MusTa-26Q"/> <jazz_rm:PrimaryText rdf:parseType="Literal"><div id="_Nf2cQJKNEd25PMUBGiN3Dw" xmlns="http://www.w3.org/1999/xhtml"><h1 id="_DwpWsMueEd28xKN9fhQheA">Test Document</h1></div></jazz_rm:PrimaryText> <dc:creator rdf:resource="https://localhost:9444/jts/users/aquiles"/> <oslc:serviceProvider rdf:resource="https://localhost:9444/rm/discovery/_L_AhyVwSEeOl7MusTa-26Q/services.xml"/> <dc:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">85</dc:identifier> <oslc_rm:implementedBy rdf:resource="http://www.ibm.com"/></oslc_rm:Requirement> </rdf:RDF>Then I get a 200 OK response and the requirement is correctly updated.
Status:
HTTP/1.1 200 OKResponse Headers:
Server: Apache-Coyote/1.1 Content-Location: https://localhost:9444/rm/resources/_b5FNdF6yEeOXYZKyXGYZMg?revision=_caYjsV6yEeOXYZKyXGYZMg Location: https://localhost:9444/rm/resources/_b5FNdF6yEeOXYZKyXGYZMg X-Last-Modified-XSD: 2013-12-06T20:10:25.515Z Last-Modified: Fri, 06 Dec 2013 20:10:25 GMT X-Last-Modified-User: https://localhost:9444/jts/users/aquiles ETag: "_caYjsV6yEeOXYZKyXGYZMg" OSLC-Core-Version: 2.0 Content-Type: application/xml Transfer-Encoding: chunked
Date: Fri, 06 Dec 2013 20:10:25 GMT
Then, if I search for the created Requirement by title with an OSLC query using oslc.where=dc:title="MyDocument", I get no results.
GET https://localhost:9444/rm/views?oslc.query=true&oslc.prefix=dcterms%3D%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E&oslc.where=dcterms%3Atitle%3D%22MyDocument%22The response is:
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:jazz_rm="http://jazz.net/ns/rm#" xmlns:oslc="http://open-services.net/ns/core#" xmlns:oslc_rm="http://open-services.net/ns/rm#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> <oslc:ResponseInfo rdf:about="https://localhost:9444/rm/views?oslc.query=true&oslc.prefix=dcterms%3D%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E&oslc.where=dcterms%3Atitle%3D%22MyDocument%22"> <dcterms:title>Query Results</dcterms:title> </oslc:ResponseInfo> <rdf:Description rdf:about="https://localhost:9444/rm/views?oslc.query=true"> </rdf:Description> </rdf:RDF>But with a go to the Web UI, edit the title (without changing it) and save the Requirement, when I do the same query, I get results.
GET https://localhost:9444/rm/views?oslc.query=true&oslc.prefix=dcterms%3D%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E&oslc.where=dcterms%3Atitle%3D%22MyDocument%22
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:jazz_rm="http://jazz.net/ns/rm#" xmlns:oslc="http://open-services.net/ns/core#" xmlns:oslc_rm="http://open-services.net/ns/rm#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> <oslc:ResponseInfo rdf:about="https://localhost:9444/rm/views?oslc.query=true&oslc.prefix=dcterms%3D%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E&oslc.where=dcterms%3Atitle%3D%22MyDocument%22"> <dcterms:title>Query Results: 1</dcterms:title> </oslc:ResponseInfo> <rdf:Description rdf:about="https://localhost:9444/rm/views?oslc.query=true"> <rdfs:member> <oslc_rm:Requirement rdf:about="https://localhost:9444/rm/resources/_b5FNdF6yEeOXYZKyXGYZMg"> </oslc_rm:Requirement> </rdfs:member> </rdf:Description> </rdf:RDF>Does anyone know what am I doing wrong?
Accepted answer

Comments

Gabriel,

Alexandre,
Could you try using the HTTP Requester ( or similar) tool to emulate the OSLC Consumer? With this test we could verify the functionality of the OSLC provider. Use following link for it : https://jazz.net/library/article/1197

Gabriel,
I've tried with the HTTP Requester Firefox plugin. Got the same results.
It's nice to notice that after a POST, the query by title returns the expected results.
Just to remind, I'm using version 4.0.1.
I've updated the Defect 83082 with the step-by-step recording of the results.

As, Gabriel have written in the Defect 83082, the problem was with my query URI.
I was using:
https://localhost:9444/rm/views?oslc.query=true&oslc.prefix=dcterms=<http://purl.org/dc/terms/>&oslc.where=dcterms:title="NW0002_Emissao"
But, as the article mencioned by Gabriel says, I should've gotten the base query URI from oslc:QueryCapability in the services.xml.
So, the correct URI would be:
https://localhost:9444/rm/views?oslc.query=true&projectURL=https://localhost:9444/jts/process/project-areas/_uSRKUFkXEeO3gcH7VAnUFw&oslc.prefix=dcterms=<http://purl.org/dc/terms/>&oslc.where=dcterms:title="NW0002_Emissao"
Notice the projectURL parameter in the query string.
One other answer

Comments

Rosa,

Rosa,