Exception : The reference to entity "etag" must end with the ';' delimiter.
My code looks like below
Please provide me solution
HttpGet query = new HttpGet(catalogURI);
query.addHeader("Accept", "application/xml");
query.addHeader("OSLC-Core-Version", "2.0");
// Access to the Service Providers catalog
HttpResponse response = HttpUtils.sendGetForSecureDocument(server,
query, login, password, httpclient, JTS_Server);
if (response.getStatusLine().getStatusCode() != 200) {
response.getEntity().consumeContent();
throw new HttpResponseException(response.getStatusLine()
.getStatusCode(), response.getStatusLine()
.getReasonPhrase());
}
// Define the XPath evaluation environment
XPath xpath = getXpathNamespace();
String serviceProviderXPath = "//oslc:ServiceProvider[dcterms:title=\""
+ paName + "\"]/@rdf:about";
// Retrieve the designated Service Provider
InputSource source = new InputSource(response.getEntity().getContent());
Node paNode = (Node) (xpath.evaluate(serviceProviderXPath, source,XPathConstants.NODE));
OSLC Output in Rest (FireFox)
<oslc:serviceProvider> </oslc:serviceProvider>
Exception:
Fatal Error] :17:78: The reference to entity "etag" must end with the ';' delimiter.
org.xml.sax.SAXParseException; lineNumber: 17; columnNumber: 78; The reference to entity "etag" must end with the ';' delimiter.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.evaluate(Unknown Source)
at com.bosch.dngintegration.cscrm.QueryingRequirements.getServiceProvider(QueryingRequirements.java:180)
at com.bosch.dngintegration.cscrm.QueryingRequirements.run(QueryingRequirements.java:90)
at com.bosch.dngintegration.cscrm.QueryingRequirements.main(QueryingRequirements.java:81)
--------------- linked to ------------------
javax.xml.xpath.XPathExpressionException: org.xml.sax.SAXParseException; lineNumber: 17; columnNumber: 78; The reference to entity "etag" must end with the ';' delimiter.
at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.evaluate(Unknown Source)
at com.bosch.dngintegration.cscrm.QueryingRequirements.getServiceProvider(QueryingRequirements.java:180)
at com.bosch.dngintegration.cscrm.QueryingRequirements.run(QueryingRequirements.java:90)
at com.bosch.dngintegration.cscrm.QueryingRequirements.main(QueryingRequirements.java:81)
Caused by: org.xml.sax.SAXParseException; lineNumber: 17; columnNumber: 78; The reference to entity "etag" must end with the ';' delimiter.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
... 4 more
Please provide me solution
HttpGet query = new HttpGet(catalogURI);
query.addHeader("Accept", "application/xml");
query.addHeader("OSLC-Core-Version", "2.0");
// Access to the Service Providers catalog
HttpResponse response = HttpUtils.sendGetForSecureDocument(server,
query, login, password, httpclient, JTS_Server);
if (response.getStatusLine().getStatusCode() != 200) {
response.getEntity().consumeContent();
throw new HttpResponseException(response.getStatusLine()
.getStatusCode(), response.getStatusLine()
.getReasonPhrase());
}
// Define the XPath evaluation environment
XPath xpath = getXpathNamespace();
String serviceProviderXPath = "//oslc:ServiceProvider[dcterms:title=\""
+ paName + "\"]/@rdf:about";
// Retrieve the designated Service Provider
InputSource source = new InputSource(response.getEntity().getContent());
Node paNode = (Node) (xpath.evaluate(serviceProviderXPath, source,XPathConstants.NODE));
OSLC Output in Rest (FireFox)
<oslc:serviceProvider> </oslc:serviceProvider>
Exception:
Fatal Error] :17:78: The reference to entity "etag" must end with the ';' delimiter.
org.xml.sax.SAXParseException; lineNumber: 17; columnNumber: 78; The reference to entity "etag" must end with the ';' delimiter.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.evaluate(Unknown Source)
at com.bosch.dngintegration.cscrm.QueryingRequirements.getServiceProvider(QueryingRequirements.java:180)
at com.bosch.dngintegration.cscrm.QueryingRequirements.run(QueryingRequirements.java:90)
at com.bosch.dngintegration.cscrm.QueryingRequirements.main(QueryingRequirements.java:81)
--------------- linked to ------------------
javax.xml.xpath.XPathExpressionException: org.xml.sax.SAXParseException; lineNumber: 17; columnNumber: 78; The reference to entity "etag" must end with the ';' delimiter.
at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.evaluate(Unknown Source)
at com.bosch.dngintegration.cscrm.QueryingRequirements.getServiceProvider(QueryingRequirements.java:180)
at com.bosch.dngintegration.cscrm.QueryingRequirements.run(QueryingRequirements.java:90)
at com.bosch.dngintegration.cscrm.QueryingRequirements.main(QueryingRequirements.java:81)
Caused by: org.xml.sax.SAXParseException; lineNumber: 17; columnNumber: 78; The reference to entity "etag" must end with the ';' delimiter.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
... 4 more