Skip to Content
Former Member
Jun 17, 2015 at 09:20 AM

Accessing the content of "mydocuments" over custom java client


I'm trying to access the content of the "My Documents" repository on my SAP Mobile Documents cloud instance over a native android app.

I downloaded the source code of this… guide.

I was able to successfully create a new folder inside the myDocuments repository and uploaded a .jpg over the web interface, which I can both see when accessing the SMD over browser.

I tried to get the content of the myDocuments repository over my android app like the follwing:

RepositorySession repositorySession = RepositorySession.getInstance();
Session myDocumentsSession = repositorySession.createSession(serverUrl, userName, password);
String myDocumentsHomeFolder = repositorySession.getMyDocumentsHomeFolderId();

Folder root = myDocumentsSession.getRootFolder(); //is this the myDocuments repository at all?
ItemIterable<CmisObject> children = root.getChildren();

for (CmisObject child : children) {

Log.d("test", "Found object: "+child.getName()+" ("+child.getType().getDisplayName()+") with ID "+child.getId());

I get the result:

Found object: P1941458879 (CMIS Folder) with ID QrseoVymkvOs-memRwhyrzyLuE4O7-NJ4kAzJDDLpAA

Found object: settings (CMIS Folder) with ID xoKy9btE46hmbd8pehmJhS9kjQ4h2sLe33N57F45AP4

but not the folder I manually created and not the .jpg i uploaded.

What am I missing out here? Is the result of getRootFolder() the myDocuments repository?

How would I get the content of the folder I manually created?

Any help is appreciated!