05-11-2009 11:01 PM
05-12-2009 05:50 AM
05-12-2009 09:57 PM
05-13-2009 03:46 AM
05-14-2009 12:01 AM
05-14-2009 02:59 AM
int count;
// Authenticator.setDefault(new MyAuthenticator());
try {
java.net.URL url = new java.net.URL("http://localhost:8080/share/proxy/alfresco/api/node/content/workspace/SpacesStore/1c72a80b-b9d7-4b04...");
// String userPassword = "admin" + ":" + "mangocreativcde";
// String encoding = new sun.misc.BASE64Encoder().encode (userPassword.getBytes());
// URLConnection uc = url.openConnection();
// uc.setRequestProperty ("Authorization", "Basic " + encoding);
// uc.connect();
java.io.BufferedInputStream in = new java.io.BufferedInputStream(url.openStream());
java.io.FileOutputStream fos = new java.io.FileOutputStream("d:/a.jpg");
java.io.BufferedOutputStream bout = new java.io.BufferedOutputStream(fos);
byte data[] = new byte[1024];
while ((count = in.read(data)) != -1) {
bout.write(data, 0, count);
}
bout.close();
//out.close();
in.close();
} catch (java.io.IOException e) {
System.out.println(e.getMessage());
}
But it throw such a exception:Server returned HTTP response code: 401 for URL: http://localhost:8080/share/proxy/alfresco/api/node/content/workspace/SpacesStore/1c72a80b-b9d7-4b04...
AuthenticationUtils.startSession(USERNAME, PASSWORD);
to start a session, but it still doesn't work.05-14-2009 03:45 AM
http://localhost:8080/alfresco/service/api/node/content/workspace/SpacesStore/1c72a80b-b9d7-4b04-bdb...
05-14-2009 05:36 AM
05-14-2009 06:54 AM
04-05-2011 03:40 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.