cancel
Showing results for 
Search instead for 
Did you mean: 

Error while establishing a connection

Former Member
0 Kudos

Hi,

I'm trying to establish a connection to a SAP Mobile Documents Server (Cloud Trial Instance) via an native android app. I'm using OpenCMIS for handling the connection. I'm trying basic stuff like the following to just get the available repositories:

SessionFactory sessionFactory = SessionFactoryImpl.newInstance();
Map parameters = new HashMap();
parameters.put(SessionParameter.USER, "foo");
parameters.put(SessionParameter.PASSWORD, "bar");
parameters.put(SessionParameter.BROWSER_URL, "https://mdocstrial-foobar.hana.ondemand.com/mcm/json");
parameters.put(SessionParameter.BINDING_TYPE, BindingType.BROWSER.value());
List<Repository> repositories = sessionFactory.getRepositories(parameters);

When this code is run, I'm promted a CmisConnectionException:


CmisConnectionException: Cannot access "https://mdocstrial-foobar.hana.ondemand.com/mcm/json": null


As far as I know there is no proxy involved. Is there anything I'm missing out?

Edit:

I just found out, that when the exact same code is executed in an AsyncTask, another exception instead of the first one is thrown:

CmisConnectionException: Parsing exception!

Any ideas on that?

Christian

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Ah never mind guys, got it working.

Executing the code in an AsyncTask and changing the BROWSER_URL to "https://mdocstrial-foobar.hana.ondemand.com/mcm/b/json" got the thing running for me!

Former Member
0 Kudos

Just to clarify why Christian had to use the endpoint /b/json:

In the example code above, Basic authentication with username and password was used, so the endpoint URL has to be /b/json.

See documentation here: http://help.sap.com/saphelp_mdocs10/helpdata/en/d6/d38e336b9a4114ab02dad141e241d1/content.htm?frames...

Answers (0)