cancel
Showing results for 
Search instead for 
Did you mean: 

remote object call to alfresco on another tomcat

zhihailiu
Champ on-the-rise
Champ on-the-rise
I have a Share webscript (JavaScript) where it calls a repository webscript using remote object.

var result = remote.connect("alfresco").get('api/people/userId?groups=true');

This works fine when Share and Alfresco are deployed on the same server/port, but gets 404 when Alfresco is deployed on another Tomcat. For example, I use localhost:8080/alfresco and localhost:8081/share during development. How to get remote object call work in that case? What about webscript authentication? Thanks.
2 REPLIES 2

kavilash23
Champ on-the-rise
Champ on-the-rise
You need to make sure that under the <remote></remote> section of share-config-custom.xml (if you don't have one then add it from the .sample file in tomcat/webapps/share/classes/alfresco/web-extension) of the SHARE webapp points to the alfresco server

<endpoint>
            <id>alfresco</id>
            <name>Alfresco - user access</name>
            <description>Access to Alfresco Repository WebScripts that require user authentication</description>
            <connector-id>alfresco</connector-id>
            <endpoint-url>http://ip_of_alfresco_server:8080/alfresco/s</endpoint-url>
            <identity>user</identity>
         </endpoint>

zhihailiu
Champ on-the-rise
Champ on-the-rise
Thank you!