03-05-2017 01:38 PM
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
03-05-2017 04:27 PM
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
03-05-2017 04:27 PM
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
03-06-2017 07:28 AM
This has also been covered in a post on the old forums which has been migrated to the new Jive platform.
03-06-2017 03:46 PM
Hi Axel,
Can you tell me where to add this webscripts.container bean?
Thanks
Jamil
03-06-2017 09:00 PM
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.
03-07-2017 06:36 AM
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)
11-30-2023 02:26 PM
Explore our Alfresco products with the links below. Use labels to filter content by product module.