I'm trying to use the webdav client lib with the library Jakarta common
http client 3.0rc2.
Most of the methods seem to works well except the propatch method.
My code :
Credentials oCredentiels = new UsernamePasswordCredentials("root",
"root");
HttpClient client = new HttpClient();
client.getState().setCredentials(AuthScope.ANY, oCredentiels);
PropPatchMethod proppatchMethod = new
PropPatchMethod("http://localhost:8080/slide/users/michenux");
proppatchMethod.setDoAuthentication(true);
proppatchMethod.addPropertyToSet("password", "dudule", "S", "slide");
try {
int state = client.executeMethod(proppatchMethod);
System.out.println(state);
} catch ( Exception e) {
e.printStackTrace() ;
}
The result is :
http-8080-Processor25, 02-mai-2005 11:38:04, root, PROPPATCH, 400 "Bad
Request"
The xml, that is sent to the slide server, is the same as with the http
client 2.0 :
<?xml version="1.0" encoding="utf-8" ?>
<D:propertyupdate xmlns:D="DAV:">
<D:set>
<D:prop>
<S:password xmlns:S="slide">dudule</S:password>
</D:prop>
</D:set>
</D:propertyupdate>
Any idea ?