URI userUri = new URIValue(users+username);
MkcolMethod mkcolMethod = new MkcolMethod(domain+userUri.toString());
mkcolMethod.setDoAuthentication(true);
HttpState httpState = new HttpState();
httpState.setCredentials(null, host, credentials);
int state = mkcolMethod.execute(httpState, new HttpConnection(host, port, protocol));
if ( state == HttpStatus.SC_CREATED ) {
changePassword(userUri, null, password, credentials);
return userUri;
}
return null;