bpAuth.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, host+"/OKMAuth");
bpDocument.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, host+"/OKMDocument");
token = okmAuth.login(username, password);
okmDocument.checkout(token, doc.getPath());
byte[] bytedoc = okmDocument.getContent(token, doc.getPath(), false);
String fileName = Util.getLocalFilenameWithoutCollisions(doc, directoryPath);
File file = new File(fileName);
file.createNewFile();