我正在尝试在android中使用propfind。我是webdav的新手。我已将Jackrabbit jar添加到我的项目中。我不知道如何使用PROPFIND,请建议我任何网站或任何可以获取文件列表的代码。
我正在使用代码,但我得到一个例外:
HostConfiguration config=new HostConfiguration();
config.setHost("");
MultiThreadedHttpConnectionManager manager = new MultiThreadedHttpConnectionManager();
HttpConnectionManagerParams params = new HttpConnectionManagerParams();
params.setMaxConnectionsPerHost(config, 5);
HttpClient client = new HttpClient(manager);
client.setHostConfiguration(config);
try {
PropFindMethod propfind=new PropFindMethod("https://",PropFindMethod.PROPFIND_ALL_PROP,1);
Credentials creds=new UsernamePasswordCredentials("XXXX", "XXXXX");
client.getState().setCredentials(AuthScope.ANY, creds);
int Status=client.executeMethod(propfind);
Log.d("Status",Status+"");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
ERROR:
05-31 18:08:49.908: E/AndroidRuntime(29145): java.lang.ExceptionInInitializerError
请帮忙。提前谢谢