List of usage examples for org.apache.solr.client.solrj.impl XMLResponseParser processResponse
@Override
public NamedList<Object> processResponse(InputStream in, String encoding)
From source file:com.doculibre.constellio.utils.NamedListUtils.java
License:Open Source License
public static NamedList<Object> convertXMLToNamedList(InputStream in) { XMLResponseParser parser = new XMLResponseParser(); return parser.processResponse(in, "UTF-8"); }
From source file:org.vootoo.server.RequestProcesserTest.java
License:Apache License
protected QueryResponse processResponse(SolrProtocol.SolrResponse protocolResponse) { String charset = ProtobufUtil.getResponseBodyCharset(protocolResponse); /*/*from w ww . j a va 2 s. c om*/ byte[] bytes = ByteStreams.toByteArray(ProtobufUtil.getSolrResponseInputStream(protocolResponse)); System.out.println(); System.out.println(new String(bytes, charset)); */ XMLResponseParser parser = new XMLResponseParser(); NamedList<Object> namedList = parser .processResponse(ProtobufUtil.getSolrResponseInputStream(protocolResponse), charset); QueryResponse queryResponse = new QueryResponse(); queryResponse.setResponse(namedList); /* System.out.println(); System.out.println(namedList); */ return queryResponse; }