Below is the browser binding url I am using to get connected to Alfresco
https://dev.alfresco.xxxx.org/alfresco/api/-default-/public/cmis/versions/1.1/browser
I am able to get connected to repository and establish a session but when I am trying to get session.getRootFolder() or session.query() I am getting "Redirects are not supported (HTTP status code 301): Moved Permanently"
I am able to successfully print the below repository information:
Info about the first Alfresco repo [ID=-default-][name=][CMIS ver supported=1.1]
After getting session...Session 7f9199db-ce37-47b4-97c2-578ec51a01ac
repo query capability==BOTHCOMBINED
I tried to look the getRootFolder() method and figured that it is internally building an url and invoking get method to read information from the repository. Is it HTTPS redirecting to HTTP? Please help me figure out the issue. Are there any special setting that I have to add in the alfresco.global properties?
/**
* Performs a GET on an URL, checks the response code and returns the
* result.
*/
protected Response read(UrlBuilder url) {
// make the call
Response resp = getHttpInvoker().invokeGET(url, session);
// check response code
if (resp.getResponseCode() != 200) {
throw convertStatusCode(resp.getResponseCode(), resp.getResponseMessage(), resp.getErrorContent(), null);
}
return resp;
}