web services - How to call Alfresco (repository) webscript from Share in Java -
web services - How to call Alfresco (repository) webscript from Share in Java -
i know may down-voted trivial question...
in javascript easy (even magical): remote.call("/api/...")
how in java?
i read lots of posts this one, alfresco (repository) url either hard coded http://localhost:8080/alfresco
, either undefined (exemple : repo_web_service_url
).
is there helper give me url of repository? there class same remote
javascript root object?
i’m sorry if reply obvious, can’t see it, i’m searching hours , i'm starting going crazy should no-brainer...
in order create remote available in share script need inject remote using spring.
set context file set remote variable:
<bean id="myevaluator" class="org.me.myevaluator"> <property name="remote" ref="webframework.webscripts.scriptremote" /> </bean>
then need create variable in java class. given can utilize like:
public class myevaluator extends baseevaluator { private scriptremote remote; public void setremote(scriptremote remote) { this.remote = remote; } public void doscriptcall() { response response = remote.call("/api/..."); } }
java web-services alfresco alfresco-share
Comments
Post a Comment