I'm trying to use webdavresuorce but when I try to use the propfindmethod the status respose of the server is 400 "Bad Request".
Some one have any idea of witch could be the problem?
Thanks
gonzo
Code:
public static void main(
String[] args) throws URIException {
String user = new String("pippo");
String password = new String("pluto");
String host = new String("host.xgplab.xgp");
String abs_path = new String("/path/path2/Documents");
int port = 50000;
HttpURL url = new HttpURL(user, password, host, port, abs_path);
System.out.println(url);
System.out.println(url.getEscapedUser());
try {
WebdavResource container = new WebdavResource(url, WebdavResource.OPTIONS_VERSION_HISTORY, org.apache.webdav.lib.methods.DepthSupport.DEPTH_0);
Vector<Object> vec = new Vector<Object>();
vec.addElement(WebdavResource.DISPLAYNAME);
vec.addElement(WebdavResource.CREATIONDATE);
System.out.println(container.propfindMethod(org.apache.webdav.lib.methods.DepthSupport.DEPTH_0));
System.out.println(container.propfindMethod(url.getPath(), org.apache.webdav.lib.methods.DepthSupport.DEPTH_0, vec));
} catch (IOException e) {
e.printStackTrace();
}
}
}