PropPatchMethod proppatchMethod = new PropPatchMethod(domain+uri.toString());
proppatchMethod.setDoAuthentication(true);
HttpState httpState = new HttpState();
httpState.setCredentials(null, host, credentials);
proppatchMethod.addPropertyToSet(name, value, "S", namespace);
int state = proppatchMethod.execute(httpState, new HttpConnection(host, port, protocol));
if ( state != HttpStatus.SC_MULTI_STATUS ) {
throw new IOException("Received status code "+state+" when doing PROPPATH on URI="+uri);
}
}