cancel
Showing results for 
Search instead for 
Did you mean: 

Change external alfresco url (/service/cmis) for iphone ap

goebel
Champ on-the-rise
Champ on-the-rise
Hi

We have a testing alfresco server (4.0c) which is behind a firewall an we want to open it for external use. We did some apache rewrite rules and the web interface for alfresco and share is available from internet. So everything works correctly for alfresco and share.

The server is available through internal url : http://myalfresco:8080/alfresco
The server is available through external url : http://www.mycompany.com/alfresco

But when we try the iphone/ipad application, we are able to connect and see the sites. But when we try to enter a site we get an error in the ios app "Alfresco Mobile did not connect to http://myalfresco:8080/alfresco/service/cmis/s/workspace/…..
The problem is that the iphone app gets the internal url from the webservice. When I try the url from internal network I am able o download the xml data which is send from the server to the client. In this xml data, all the href point to http://myalfresco:8080/alfresco instead of http://www.mycompany.com/alfresco

I checked the forums and tried a lot of modifications in alfresco-global.properties but whithout success 😞
For instance, I tried to change these parameters

repo.remote.url=http://www.mycompany.com/alfresco
url.serviceContext=http://www.mycompany.com/alfresco
url.serverPath=http://www.mycompany.com/alfresco

Every time I tried the cmis services, I always get the internal hostname

Does anybody have a hint how to fix it ?

Thanks a lot

Georges Goebel
15 REPLIES 15

goebel
Champ on-the-rise
Champ on-the-rise
I also tried this whithout success 😞

https://issues.alfresco.com/jira/browse/MOBILE-42

mikeh
Star Contributor
Star Contributor
I also tried this whithout success 😞

https://issues.alfresco.com/jira/browse/MOBILE-42
The last comment in that JIRA issue is definitely the correct way to solve the problem. I say "definitely" because we had to solve the exact same issue for our soon-to-be-released cloud service.

Thanks,
Mike

goebel
Champ on-the-rise
Champ on-the-rise
Thanks for your reply

Which version you tried 3.4 or 4.0 ? I use 4.0.c and there is no folder <tomcat>/shared/classes/META-INF
So I created the folder and file but it still does not work as expected


Georges

mikeh
Star Contributor
Star Contributor
That should work on both 3.4 and 4.0. Check your Tomcat configuration is set to look in the shared/classes area. Look at steps 3 and 4 here: http://wiki.alfresco.com/wiki/Install_Tomcat6

Thanks,
Mike

goebel
Champ on-the-rise
Champ on-the-rise
Hi

I use the alfresco 4.0c distribution where tomcat is bundled. Nevertheless, I tried your advise but still without any change

In alfresco 4, there is a folder "alfresco-4.0.c/tomcat/shared/classes/alfresco/extension" with a sample file "web-scripts-config-custom.xml.sample". I also changed this file with the modifications of the JIRA MOBILE-42. Still no change 😞

Regards

Georges Goebel

goebel
Champ on-the-rise
Champ on-the-rise
In the file ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/web-client-config.xml there is a section


<config evaluator="string-compare" condition="Server">
      <!– The public web server hosting this web client –>
      <server>
         <!– Enable and adjust the following settings to allow for proxied use of Alfresco
         <scheme>http</scheme>
         <hostname>localhost</hostname>
         <port>8080</port>
         –>
      </server>
   </config>

But changing the values to the external adress does not affect the behaviour of the iphone app. Ther is still the local url in the xml. (I try from an external client the adresse http://www/mycompany.com/alfresco/service/cmis)
The resulting xml contains the internal hostname. Is there somewhere else a property to change

Here you find a sniped of the xml


<?xml version="1.0" encoding="utf-8"?>
<service xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/" xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/" xmlns:alf="http://www.alfresco.org">
  <workspace>
    <atom:title>Main Repository</atom:title>

    <collection href="http://myalfresco:8080/alfresco/service/cmis/s/workspace:SpacesStore/i/c2ab46ac-c281-447b-9701-d80d6...">
      <atom:title>root collection</atom:title>
      <cmisra:collectionType>root</cmisra:collectionType>
    </collection>
    <collection href="http://myalfresco:8080/alfresco/service/cmis/types">
      <atom:title>type collection</atom:title>
      <cmisra:collectionType>types</cmisra:collectionType>
    </collection>
    <collection href="http://myalfresco:8080/alfresco/service/cmis/checkedout">

mikeh
Star Contributor
Star Contributor
Please try again with the correct path and filename that are specified in the JIRA ticket.

Thanks,
Mike

goebel
Champ on-the-rise
Champ on-the-rise
Hi,

I did exactly what was written in the JIRA issue

1) I created the missing directory META-INF : alfresco-4.0.c/tomcat/shared/classes/META-INF
2) I created the file spring-webscripts-config-custom.xml in the folder alfresco-4.0.c/tomcat/shared/classes/META-INF
3) restarted alfresco
4) tried with iphone

Still the same issue

Next I added the folder  alfresco-4.0.c/tomcat/shared/classes/META-INF to the catalina.properties in tomcat/conf and restarted. Same issue

Do I miss something ?

Georges

goebel
Champ on-the-rise
Champ on-the-rise
It is working !!!!

You have to add "shared.loader=${catalina.base}/shared/classes" to the tomcat/conf/catalina.properties (without META-INF) and the restart.

You have to create the folder and file as described in the JIRA

Thanks man, you saved my day. Now I will grab some beer to celebrate 🙂

Georges