As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
// 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();