String url = domain+"/";
SearchMethod searchMethod = new SearchMethod(url, query);
searchMethod.setDoAuthentication(true);
HttpState httpState = new HttpState();
httpState.setCredentials(null, host, credentials);
int state = searchMethod.execute(httpState, new HttpConnection(host, port, protocol));
if ( state != HttpStatus.SC_MULTI_STATUS ) {
throw new IOException("Received status code "+state+" when doing SEARCH with query="+query);
}
List values = new ArrayList();
for ( Enumeration e = searchMethod.getAllResponseURLs(); e.hasMoreElements(); ) {