AnsweredAssumed Answered

Need Help to  access alfresco loacalhost:8080/services/cmis through android app.

Question asked by malitha on May 8, 2013
Latest reply on May 10, 2013 by malitha
hi, I'm new to alfresco and I need ur help to access localhost:8080/alfresco/services/cmis through my android app in emulator. I tried this sample code shown below and got a error. Pls help me … any help appreciated.

protected String doInBackground(String… params) {
Log.d(TAG, "doInBackground");
Log.d(TAG, params[0] + ":" + params[1] + ":" + params[2]);
String url = params[0];
String username = params[1];
String password = params[2];
// HelloRepo
try {
   
   // connect to on-premise repo
   RepositorySession session =  RepositorySession.connect(url,   username, password);
   
   if (session != null) {
   // Get some repository information
   Log.d(TAG, "baseUrl: " + session.getBaseUrl());
   Log.d(TAG, "rootFolder: "
   + session.getRootFolder().getName());
   // Obtain a repository information object
   RepositoryInfo repoInfo =
   session.getRepositoryInfo();
   Log.d(TAG, "repoId: " + repoInfo.getIdentifier());
   Log.d(TAG, "repoName: " + repoInfo.getName());
   Log.d(TAG, "repoDescription: " +
   repoInfo.getDescription());
   Log.d(TAG, "repoVersion: " + repoInfo.getVersion());
   Log.d(TAG, "repoEdition: " + repoInfo.getEdition());
   // Get site service

GOT THE ERROR ….
Failed to connect: org.alfresco.mobile.android.api.exceptions.AlfrescoSessionException: org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException: Cannot access http://localhost:8080/alfresco/service/cmis: Permission denied

Near "RepositorySession session =  RepositorySession.connect(url,   username, password);" this code.

Outcomes