我正在尝试使用 apache abdera 在休息调用后解析从 websphere 门户收到的响应原子提要。但是在解析时收到以下错误。有人可以让我知道是什么问题吗?
org.apache.abdera.parser.stax.FOMUnsupportedTextTypeException:不支持的文本类型:text/html
Abdera abdera = new Abdera();
AbderaClient abderaClient = new AbderaClient(abdera);
Factory factory = abdera.getFactory();
Cookie[] cookies=request.getCookies();
org.apache.commons.httpclient.Cookie ltpaCookieHttpCommons = new org.apache.commons.httpclient.Cookie();
RequestOptions options = new RequestOptions(true);
List<String> cookieStrings = new ArrayList<String>();
options.setHeader("Cookie", (String[])cookieStrings.toArray(new String[cookieStrings.size()]));
ClientResponse resp = abderaClient.get("http://localhost:10039/wps/contenthandler/!ut/p/digest!W9TQFjuU7ADCwtSkxDsxHg/searchfeed/search?queryLang=en&locale=en&resultLang=en&query=test&scope=com.ibm.lotus.search.ALL_SOURCES&start=0&results=10&output=application/xml", options);
System.out.println(resp.getType());
if (resp.getType() == ResponseType.SUCCESS) {
System.out.println("!!!!!!Response success!!!!!!");
Document<Feed> docFeed = resp.getDocument();
// JSON Output
Writer writer = abdera.getWriterFactory().getWriter("json");
try {
Feed feed=docFeed.getRoot();
abdera.getWriterFactory().getWriter("json").writeTo(feed, System.out);
} catch(Exception e) {
e.printStackTrace();
}
} else {
}