Я не уверен, что следующее сработает, но стоит попробовать.
Изменить:
return webResource.queryParams(queryParams).get(String.class);
На:
return webResource.queryParams(queryParams).get(Source.class);
В качестве альтернативы вы можете использовать API java.net и получить результат в виде потока.Следующий пример взят из моего блога :
String uri =
"http://localhost:8080/CustomerService/rest/customers/1";
URL url = new URL(uri);
HttpURLConnection connection =
(HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Accept", "application/xml");
JAXBContext jc = JAXBContext.newInstance(Customer.class);
InputStream xml = connection.getInputStream();
Customer customer =
(Customer) jc.createUnmarshaller().unmarshal(xml);
connection.disconnect();