According to the new Wrox Alfresco book (pp. 306 - 309), the proper way of defining a remote end-point in Alfresco is to define <authenticator />, <connector />, and <endpoint /> elements and invoke them using the Webscript 'remote' object.
For instance, if I define the following connector objects in a configuration file:
I should be able to connect to the defined endpoint using the following script:
<config evaluator="string-compare" condition="Remote">
The default authenticators, connectors, and endpoints are defined in the 'spring-webscripts-config.xml' file of the 'spring0webscripts' project of the Spring Surf SDK.
var connector = remote.connect("proof-of-concept-endpoint");
model.result = connector.get("/path/to/a/remote/service");
Problem is, the book never tells where this configuration is supposed to be placed -- especially if you're trying to add end-points to a Share application. If you take a look at '/share/WEB-INF/classes/alfresco/slingshot-application-context.xml', it appears as though endpoints are to be added to one of the following three locations:
If I define my endpoints in a local copy of:
my endpoints are read, but the default endpoints defined in the Spring Surf 'spring-webscripts' project are not. Clearly, I shouldn't be overriding these settings.
However, if I define my endpoints in:
I learn that my endpoint is not known to my application.
Anyone have an idea on how to do this?