Hello,
I want to call an External URL as POST from my server js webscript
I tried with the predefined Surf remote variable but I have "remote not found" error
Thank you
Jamil
Solved! Go to Solution.
By default, the remote object is disabled for repository tier web scripts. But you can always re-enable it. Take a look at this post on Stack to see if it helps you out: web scripting - HTTP Request from WebScript in Alfresco - Stack Overflow
By default, the remote object is disabled for repository tier web scripts. But you can always re-enable it. Take a look at this post on Stack to see if it helps you out: web scripting - HTTP Request from WebScript in Alfresco - Stack Overflow
This has also been covered in a post on the old forums which has been migrated to the new Jive platform.
Hi Axel,
Can you tell me where to add this webscripts.container bean?
Thanks
Jamil
Any file on the classpath ending in context.xml. Ideally you already have an amp project started and you can add it to service-context.xml or similar.
After adding the webscripts.container bean to the service-context.xml inside my amp I have an exception (related to Solr!!!). Note that when I remove the webscripts.container the server is back and work well. Any conflict?
Thank you
Jamil
<bean id="webscripts.container" class="org.alfresco.repo.web.scripts.RepositoryContainer" parent="webscripts.abstractcontainer">
<property name="name"><value>Repository</value></property>
<property name="scriptObjects">
<map merge="true">
<entry key="paging">
<ref bean="webscripts.js.paging"/>
</entry>
<entry key="remote">
<ref bean="webscripts.script.remote" />
</entry>
<entry key="cmis">
<ref bean="webscripts.js.cmis.client" />
</entry>
</map>
</property>
</bean>
The exception:
2017-03-07 14:21:30,027 ERROR [solr.tracker.AbstractTracker] [SolrTrackerScheduler_Worker-31] Model tracking failed
org.alfresco.error.AlfrescoRuntimeException: 02070063 GetModelsDiff return status is 503
at org.alfresco.solr.client.SOLRAPIClient.getModelsDiff(SOLRAPIClient.java:1157)
at org.alfresco.solr.tracker.ModelTracker.trackModelsImpl(ModelTracker.java:249)
at org.alfresco.solr.tracker.ModelTracker.trackModels(ModelTracker.java:207)
at org.alfresco.solr.tracker.ModelTracker.ensureFirstModelSync(ModelTracker.java:229)
at org.alfresco.solr.component.EnsureModelsComponent.prepare(EnsureModelsComponent.java:80)
at org.apache.solr.handler.component.AlfrescoSearchHandler.handleRequestBody(AlfrescoSearchHandler.java:283)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
at org.alfresco.solr.Cloud.getResponse(Cloud.java:159)
at org.alfresco.solr.Cloud.getSolrDocumentList(Cloud.java:143)
at org.alfresco.solr.SolrInformationServer.getDocsWithUncleanContent(SolrInformationServer.java:715)
at org.alfresco.solr.tracker.ContentTracker.doTrack(ContentTracker.java:74)
at org.alfresco.solr.tracker.AbstractTracker.track(AbstractTracker.java:185)
at org.alfresco.solr.tracker.TrackerJob.execute(TrackerJob.java:47)
at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.