Shouldn't the following code work on the attached input file?
It matches the structure of a Solr response with wt=xml.
Unexpectedly (for me), it throws a
java.lang.ClassCastException: org.apache.solr.common.util.SimpleOrderedMap cannot be cast to java.util.Map
Am I missing something, is XMLResponseParser deprecated or something?
We use a setup like this to "mock" a QueryResponse for unit tests in our service that post-processes the Solr response.
Obviously, it works with the javabin format which SolrJ uses internally.
But that is no appropriate format for unit tests, where the response should be human readable.
I think there's some conversion missing in QueryResponse or XMLResponseParser.
Note: The null value supplied as SolrServer argument to the constructor of QueryResponse shouldn't have an effect as the error occurs before the parameter is even used.