Nodes are not getting parsed for RTC 3.0.1.2 with OSLC 2.0
Hi,
I am using RTC 3.0.1.2 & want to extract the dc:title nodes using Rest API. Below is the code snippet I am using for the same.
HttpGet catalogDoc = new HttpGet(url);
catalogDoc.addHeader("Accept", "application/rdf+xml");
catalogDoc.addHeader("OSLC-Core-Version", "2.0");
catalogResponse= HttpUtils.sendGetForSecureDocument(server, catalogDoc, login, password, httpclient);
if (catalogResponse.getStatusLine().getStatusCode() == 200) {
xpath.setNamespaceContext(new NamespaceContextMap(new String[]{ "oslc_disc","http://open-services.net/xmlns/discovery/1.0/",
"dc", "http://purl.org/dc/terms/"}));
source = new InputSource(catalogResponse.getEntity().getContent());
titleNodes = (NodeList) (xpath.evaluate("/oslc_disc:ServiceProviderCatalog/oslc_disc:ServiceProvider/dc:title", source, XPathConstants.NODESET));
I am getting the below error while invoking 'xpath.evaluate' call in the above last line.
org.xml.sax.SAXParseException: The reference to entity \"etag\" must end with the ';' delimiter.\r\n\tat com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)\r\n\tat com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
Need urgent help to fix this issue. Let me know if somebody has any solution.
Thanks
Guru
I am using RTC 3.0.1.2 & want to extract the dc:title nodes using Rest API. Below is the code snippet I am using for the same.
HttpGet catalogDoc = new HttpGet(url);
catalogDoc.addHeader("Accept", "application/rdf+xml");
catalogDoc.addHeader("OSLC-Core-Version", "2.0");
catalogResponse= HttpUtils.sendGetForSecureDocument(server, catalogDoc, login, password, httpclient);
if (catalogResponse.getStatusLine().getStatusCode() == 200) {
xpath.setNamespaceContext(new NamespaceContextMap(new String[]{ "oslc_disc","http://open-services.net/xmlns/discovery/1.0/",
"dc", "http://purl.org/dc/terms/"}));
source = new InputSource(catalogResponse.getEntity().getContent());
titleNodes = (NodeList) (xpath.evaluate("/oslc_disc:ServiceProviderCatalog/oslc_disc:ServiceProvider/dc:title", source, XPathConstants.NODESET));
I am getting the below error while invoking 'xpath.evaluate' call in the above last line.
org.xml.sax.SAXParseException: The reference to entity \"etag\" must end with the ';' delimiter.\r\n\tat com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)\r\n\tat com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
Need urgent help to fix this issue. Let me know if somebody has any solution.
Thanks
Guru