我正在尝试在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();
}
错误:
05-31 18:08:49.908: E/AndroidRuntime(29145): java.lang.ExceptionInInitializerError
请帮忙。先感谢您