Action URL in getURLElement:/configurations?parent_id=14250
Sep 27, 2011 11:32:07 AM com.lgc.btlite.Qb3FindVariableTask getURLElement
SEVERE: Cannot read from QB server: http://buildmaster3.lgc.com:8080...
org.dom4j.DocumentException: Error on line 42 of document : Character reference "�" is an invalid XML character. Nested exception: Character reference "�" is an invalid XML character.
at org.dom4j.io.SAXReader.read(SAXReader.java:482)
at org.dom4j.io.SAXReader.read(SAXReader.java:343)
at com.lgc.btlite.Qb3FindVariableTask.getURLElement(Qb3FindVariableTask.java:122)
The call in our code is
protected static Element getURLElement(String actionURL)
{
Element retVal = null;
try {
System.out.print("\nAction URL in getURLElement:" + actionURL +"\n");
HttpURLConnection conn = getURLConnection(actionURL);
conn.setReadTimeout(CONNECTION_TIMEOUT);
conn.setDoInput(true);
conn.setDoOutput(false);
conn.setRequestMethod("GET");
InputStream is = conn.getInputStream();
retVal = _sax.read(is).getRootElement(); // line 122
is.close();
} catch(Throwable t) {
_logger.log(Level.SEVERE,"Cannot read from QB server: " + QB_SERVER_URL + "...",t);
}
return(retVal);
}
The getURLConnection method appends the actionURL to the base URL for the rest API and establishes the HTTP connection. I put the URL into a broswer and it renders this