Why does CLM RM 6.0.2 not respond to OSLC Query application/json with well-formed JSON?
![]()
Using OSLC4J libraries 2.1.0 and making OSLC Core 2.0 queries to a CLM 6.0.2 DNG repository, I can properly query of application/rdf+xml Requirement.class instances. I get back proper-looking ResponseInfo collections.
However, when I attempt to set the Accept Header to application/json, I get back partial JSON objects. These contain the Requirement information but they leave out the crucial "prefixes: []" property. These means that the result can be getEntity( String.class ) received but any attempt to use a JSON Provider to marshall the JSON objects into proper OSLC Resource classes fails. It fails with a deep exception of:
org.eclipse.lyo.oslc4j.core.exception.OslcCoreMissingNamespaceDeclarationException: OSLC009: Namespace declaration not defined for namespace http://www.w3.org/1999/02/22-rdf-syntax-ns#
The debugger can trap for this and I can confirm that the JSON object has no "prefixes" property.
Postman GET for the query, after Form Authentication, also shows that the Query Result JSON string lacks the prefixes property. Therefore, apparently, something on the Jazz server is improperly serializing the Query Results to JSON.
Screenshot available at https://www.dropbox.com/s/1u3nsrrhl4dfblv/Screenshot%202016-10-27%2016.07.32.png?dl=0
Any clues as to what might be causing this and how to correct it?
{ "https://foo.atsodius.com:9443/rm/views?oslc.query=true&projectURL=https%3A%2F%2Ffoo.atsodius.com%3A9443%2Frm%2Fprocess%2Fproject-areas%2F_VL8C0HVwEeabvtjS7voR-g&vvc.configuration=https%3A%2F%2Ffoo.atsodius.com%3A9443%2Frm%2Fcm%2Fstream%2F_VcPvsHVwEeabvtjS7voR-g&oslc.paging=true&oslc.pageSize=100&oslc.where=dcterms%3Amodified%3E%222012-08-01T21%3A51%3A40.979Z%22%5E%5Exsd%3AdateTime&oslc.select=dcterms%3Aidentifier%2Cdcterms%3Acontributor%2Cdcterms%3Amodified&oslc.orderBy=%2Bdcterms%3Amodified&oslc.prefix=dcterms%3D%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%2Crdfs%3D%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%2Coslc_rm%3D%3Chttp%3A%2F%2Fopen-services.net%2Fns%2Frm%23%3E%2Cjazz_rm%3D%3Chttp%3A%2F%2Fjazz.net%2Fns%2Frm%23%3E" : { "http://purl.org/dc/terms/title" : [ { "type" : "literal" , "value" : "Query Results: 2" } ], "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" : [ { "type" : "uri" , "value" : "http://open-services.net/ns/core#ResponseInfo" } ] }, "https://foo.atsodius.com:9443/rm/resources/_3BSgYXyGEeaRoaBJ0pvnhg" : { "http://purl.org/dc/terms/contributor" : [ { "type" : "uri" , "value" : "https://foo.atsodius.com:9443/jts/users/patricia" } ], "http://purl.org/dc/terms/identifier" : [ { "type" : "literal" , "value" : "3", "datatype" : "http://www.w3.org/2001/XMLSchema#integer" } ], "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" : [ { "type" : "uri" , "value" : "http://open-services.net/ns/rm#Requirement" } ], "http://purl.org/dc/terms/modified" : [ { "type" : "literal" , "value" : "2016-09-19T18:53:40.776Z", "datatype" : "http://www.w3.org/2001/XMLSchema#dateTime" } ] }, "https://foo.atsodius.com:9443/rm/views?oslc.query=true&projectURL=https%3A%2F%2Ffoo.atsodius.com%3A9443%2Frm%2Fprocess%2Fproject-areas%2F_VL8C0HVwEeabvtjS7voR-g" : { "http://www.w3.org/2000/01/rdf-schema#member" : [ { "type" : "uri" , "value" : "https://foo.atsodius.com:9443/rm/resources/_3BSgYXyGEeaRoaBJ0pvnhg" }, { "type" : "uri" , "value" : "https://foo.atsodius.com:9443/rm/resources/_6-7pQX4IEeaRoaBJ0pvnhg" } ] }, "https://foo.atsodius.com:9443/rm/resources/_6-7pQX4IEeaRoaBJ0pvnhg" : { "http://purl.org/dc/terms/contributor" : [ { "type" : "uri" , "value" : "https://foo.atsodius.com:9443/jts/users/patricia" } ], "http://purl.org/dc/terms/identifier" : [ { "type" : "literal" , "value" : "4", "datatype" : "http://www.w3.org/2001/XMLSchema#integer" } ], "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" : [ { "type" : "uri" , "value" : "http://open-services.net/ns/rm#Requirement" } ], "http://purl.org/dc/terms/modified" : [ { "type" : "literal" , "value" : "2016-09-19T18:50:41.393Z", "datatype" : "http://www.w3.org/2001/XMLSchema#dateTime" } ] } } |