02-28-2011 11:48 PM
03-01-2011 03:33 AM
03-01-2011 04:46 AM
03-01-2011 05:13 AM
03-02-2011 01:01 AM
03-02-2011 03:09 AM
03-02-2011 06:46 AM
// setSessionProperties();
logger.debug("Connecting to: " + "http://" + server_host
+ ":" + server_port + "/alfresco");
WebServiceFactory.setEndpointAddress("http://" + server_host + ":"
+ server_port + "/alfresco/api");
//server host is an ip address
//set infinite time out
WebServiceFactory.setTimeoutMilliseconds(0);
//start session
AuthenticationUtils.startSession(server_username, server_password);
Reference reference = new Reference(STORE, null, emscmsFile.getCmsPath());
Predicate itemsToCheckOut = new Predicate(
new Reference[] { reference }, null, null);
Content[] contents = WebServiceFactory.getContentService().read(itemsToCheckOut, Constants.TYPE_CONTENT);
if(contents != null){
InputStream inputStream = ContentUtils.getContentAsInputStream(contents[0]);
logger.debug("Closing connection."
+ AuthenticationUtils.getTicket());
if (AuthenticationUtils.getTicket() != null)
AuthenticationUtils.endSession();
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.