AnsweredAssumed Answered

[Android/iOS] Alfresco Mobile : Reverse proxy configuration

Question asked by jm.pascal Employee on Dec 6, 2012
Latest reply on Jan 16, 2013 by gavinc
Hello,

CMIS in Alfresco
As you may know, Alfresco Android Mobile uses CMIS protocol to retrieve informations and data from an Alfresco Repository.
Since Alfresco 4.x, Alfresco incorporate 2 implementations of CMIS. One historical based on Webscript (/service/cmis) and one based on Apache Chemistry OpenCMIS (/cmisatom). the historical is considered as deprecated for Alfresco 4.x and we encourage to use /cmisatom instead.
So depending on what version of Alfresco Repository you have, the Android Alfresco Mobile Application use one or the other implementation automatically.

This difference is illustrated when configuring an OnPremise Alfresco Server inside the Android Application.
At the bottom of the form, you have a "Service URL" input that contains by default /alfresco. It means the application is responsible to find and bind with a specific version.
For information, if you know the iOS application, the same input is defined by default with /alfresco/service/cmis.

Reverse Proxy
By default the local machine name is used as the host. When using a proxy these config values need to be changed to the publicly accessible host and port.

For Alfresco 3.4 : /service/cmis binding
CMIS retrieves the host and port to use for "links" from web script config. By default the local machine name is used as the host. When using a proxy these config values need to be changed to the publicly accessible host and port.

To do this add the following config…

<alfresco-config> 
   
   <config evaluator="string-compare" condition="Server">
      <server>
         <scheme>http</scheme>
         <hostname>your-pulic-host</hostname>
         <port>your-port</port>
         <path>alfresco</path>
      </server>
   </config>
   
</alfresco-config>

to a file in the following location:

<tomcat>/shared/classes/META-INF/spring-webscripts-config-custom.xml

For Alfresco 4.x and above : /cmisatom binding

CMIS retrieves the host and port to use for "links" from global-properties file.

To do this add the following config…

# The servlet path, context path and server can all be selectively overridden
opencmis.context.override=true
opencmis.context.value=
# if true, the servlet path of OpenCMIS generated urls will be set to "opencmis.servletpath.value", otherwise it will be taken from the request url
opencmis.servletpath.override=true
opencmis.servletpath.value=
opencmis.server.override=true
opencmis.server.value=https://<my.public.alfresco.hostname>

to a file in the following location:

<tomcat>/shared/classes/alfresco-global.properties

Hope it helps everyone !

Outcomes