on 06-16-2015 3:10 PM
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
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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...
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.