• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

webdavresource

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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();
}
}

}
 
Put the moon back where you found it! We need it for tides and poetry and stuff. Like this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic